Post Reply 
(12C) Check if given number is Prime Number or not
09-14-2018, 08:15 PM
Post: #17
RE: (12C) Check if given number is Prime Number or not
(09-14-2018 06:33 PM)Dieter Wrote:  What do you get if you multiply the result by 10? The true value of sqrt(2) is 1,4142135623730950488... so the emulator should show 1,356237310 (when correctly rounded up) or at least 1,356237309 (when truncated after the 15th digit, as the internal routines often do – think of the 5^2 – 25 example).

When multiplied by 10, the result is 1.356237309, so it appears truncation rather than rounding is used on the 12CP emulator. Most likely though is this is just an error, retaining the full value from the underlying C math; unlike the 12c emulator running the original ROM, perhaps the 12CP was recompiled for the new Android cpu, "bringing along" the extra digits which are then crammed into the 10-digit display routines.

On the real 12CP, result is 1.356237000, as expected.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (12C) Check if given number is Prime Number or not - rprosperi - 09-14-2018 08:15 PM



User(s) browsing this thread: 1 Guest(s)