Post Reply 
(12C) Check if given number is Prime Number or not
09-14-2018, 04:19 PM
Post: #15
RE: (12C) Check if given number is Prime Number or not
(09-14-2018 12:18 PM)Dieter Wrote:  Thank you, Bob. Very enlightening, indeed. So the emulator does not seem to round the internal 15-digit result back to 12 digits. I wonder if this also applies to other functions. What does frac(sqrt(2E8)) return? 0,1356237 or are there more decimals? In the latter case the final digit(s) may be slightly off. 15 digits internal precision does not mean that in the end all 15 are correct.

12C+: 0.135620000 (Note: I am using the preceding "E" to be clear, but these are not actually displayed, there is simply a space)
12C Emulator: 0.135620000
12CP: 0.135623700
12CP Emulator: 0.135623731 <=== Again, deviation from correct behavior

(09-14-2018 12:18 PM)Dieter Wrote:  As the 12C and 12C Platinum have different precision this also means that 12C programs can give other results if run on the 12C Platinum. I wonder if this also applies to the working range: usually the 12-digit calculators operate in a domain of 1E–499 to 9,999...E+499. Is this also true for the 12C Platinum? Does e^500 produce an overflow error or does it return 1,40359...E+217 ?

12C+: 9.999999 E99
12C Emulator: 9.999999 E99
12CP: 9.999999 E99
12CP Emulator: 9.999999 E99

From the 12C Manual on p. 84 (exact same content is also in the 12CP manual):

Quote:Overflow and Underflow. If a calculation results in a number
whose magnitude is greater than 9.999999999 X 10^99 the
calculation is halted and the calculator displays 9.999999 99 (if
the number is positive) or -9.999999 99 (if the number is
negative).

If a calculation results in a number whose magnitude is less than 10-99,
the calculation is not halted, but the value 0 is used for that
number in subsequent calculations.

I never noticed this before, but I don't see any specific description of the supported numeric range in either manual.

--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 04:19 PM



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