Petit Computer Wiki
Advertisement

Adding zero to any numerical value is a null operation. Once the system has a value, there is absolutely no reason there should be a problem with adding zero, or multiplying by one. The following is an excerpt of the output in Run Mode:

OK
X=-(-524287-4095/4096)
OK
?X
524288
OK
?X+0
Overflow (?)
OK
?X-0
Overflow (?)
OK
?X*1
Overflow (?)
OK
?X/1
Overflow (?)
OK
?0+X
Overflow (?)
OK
?1*X
Overflow (?)
OK
?POW(X,1)
Overflow (POW)
OK

(For the record, this is the fourth bug I have found in PTC V2: -0 (Numerical Value) (a built-in function like SIN should not hang the system), 0.999995 (Numerical Value) (the literal 0.999995 represents a value greater than that represented by the literal 0.999994), and APPEND (Command) (the user should have some way to know if a file operation has failed to complete successfully).)

Advertisement