Thread:Numerical investigations

The following is a list of experiments I did to figure out how Petit Computer handles numerical values.

I can't quite make sense of the results.

?(1/4096)*1000

0.244

?(1/4097)*1000

0 ?524287

524287

?-524287

-524287

?524288

Overflow (?)

?-524288

Overflow (?)

?-524287.99

-524287.99

?-524287.99999

-524288

?524287.99

524287.99

?524287.99999

524288

A=524287

OK

?A+(2047/2048)

524288

?A+(4095/4096)

Overflow (?)

A=-524287

?A-(524286/524287)

-524288