Post Reply 
50g - Exponent of zero
09-28-2017, 05:19 PM
Post: #9
RE: 50g - Exponent of zero
(09-28-2017 11:26 AM)Massimo Gnerucci Wrote:  
(09-28-2017 09:37 AM)BarryT Wrote:  Interesting note: On my 32sii, 15c, 41cv, and two different Casios... 0^0 correctly gives an error. However, on my 48sx, 48gx, and according to a 42 emulator, 0^0 incorrectly returns an answer of 1.

We've already been here several times in the past... :-)
This is just the first I can pick up googling around.

But this thread has nothing to do with 0^0, let's stay on topic since 0^0 was debated a million times, this one seems a lot less frequent.
This is about any number being represented by s*M*10^X, with 1<M<10 (using 2 instead of 10 in both expressions if binary floating point) and X being the exponent we are taking about (s=sign).
The C standard library frexp() and all its incarnations in different languages return M=0 and X2=0 for frexp(0), simply because that's what's stored when you store 0 as a real number (IEEE). Notice I used X2 since this is a binary exponent, s*M*2^X.
For those not using a 50g, XPON is the command that returns X for s*M*10^X The 50g returns Inifinite result (-Inf), while other calculators give other results.

Now 0 = 0*10^X so we could all agree that M=0, but that wouldn't meet the constraint of 1<M<10. If we are strict with the definition of the mantissa and force M to be 1<M<10, then:

0 = M*10^(-Inf)

And the 50g would be correct, however, 0 MANT does return 0 on the 50g. A more correct way would be:
If MANT(0)=0, then XPON(0)=Undefined, and since any value is a solution, then 0 is not a bad answer.
If MANT(0)=Undefined, then XPON(0)=-Inf

From a practical point of view, in this thread the solution would be much easier of XPON just returned 0 instead of an error.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
50g - Exponent of zero - Claudio L. - 09-27-2017, 04:28 PM
RE: 50g - Exponent of zero - Arno K - 09-27-2017, 05:28 PM
RE: 50g - Exponent of zero - Claudio L. - 09-27-2017, 07:58 PM
RE: 50g - Exponent of zero - Joe Horn - 09-27-2017, 08:20 PM
RE: 50g - Exponent of zero - Arno K - 09-27-2017, 08:31 PM
RE: 50g - Exponent of zero - BarryT - 09-28-2017, 09:37 AM
RE: 50g - Exponent of zero - Arno K - 09-28-2017, 10:17 AM
RE: 50g - Exponent of zero - Claudio L. - 09-28-2017 05:19 PM
RE: 50g - Exponent of zero - BarryT - 09-28-2017, 09:39 PM
RE: 50g - Exponent of zero - Vtile - 09-28-2017, 11:10 PM
RE: 50g - Exponent of zero - AlexFekken - 09-28-2017, 11:45 PM
RE: 50g - Exponent of zero - AlexFekken - 09-29-2017, 12:06 AM



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