DB48X-on-DM42 icon indicating copy to clipboard operation
DB48X-on-DM42 copied to clipboard

`xroot` should return integer results when possible

Open c3d opened this issue 1 year ago • 1 comments
trafficstars

While analysing the HP50G xroot behaviour, I noticed that xroot(3;8) reutrns 2, with type 28 (i.e. integer), whereas DB48X returns a decimal value in that case.

c3d avatar Jun 10 '24 06:06 c3d

Interestingly, this has limits.

xroot(3;8) then EVAL shows 2.

xroot(3;216) then EVAL still shows xroot(3;216), and you need ->NUM to get a numerical value, which is decimal 6.. So it looks like there is some kind of factorization happening for small values up to 5, but that it does not work after that.

The idea that it is a factorization algorithm is reinforced by the observation that xroot(3;64) gives 2^2 :-)

c3d avatar Jun 10 '24 06:06 c3d