Quick quiz/puzzle

Be clear with the topic titles to help members find the answers
Post Reply
amenjet
Posts: 432
Joined: Tue Jan 03, 2023 7:54 pm

Quick quiz/puzzle

Post by amenjet »

Without using an organiser, write down exactly what an organiser would show as the result of these calculations (in Calc or OPL):

Code: Select all

5*10**20

Code: Select all

5*10**-20
Then write down what results calculator would show if you entered (from a hard reset/power on):

Code: Select all

5E20
5.00E20

Do a FIX=3

5E20
5.00E20
Once you have your results, have a look and see what the organiser shows...
User avatar
Martin
Global Admin
Posts: 442
Joined: Mon Jan 02, 2023 5:18 pm

Re: Quick quiz/puzzle

Post by Martin »

Hi Andrew.... Very interesting... go one step further and try this..

FIX=12
5*10**-20
=


Then

FIX=
5*10**-20
=


Have you worked out whats going on?
amenjet
Posts: 432
Joined: Tue Jan 03, 2023 7:54 pm

Re: Quick quiz/puzzle

Post by amenjet »

There's a few things going on, but I don't see why 5E20 has no trailing zeros but 5*10**20 does. They are both floats.
5E1*10**20 also has zeros.
I didn't know about the FIX= command.
Did you get the first two results correct?
amenjet
Posts: 432
Joined: Tue Jan 03, 2023 7:54 pm

Re: Quick quiz/puzzle

Post by amenjet »

Just found this in the manual:

Code: Select all

Results are displayed with only the necessary number of significant figures by default (up to 12), By default, only the significant figures (up to 12) are displayed in the result, but this can be changed at any time when the CALC: prompt IS shown. Simply type in FIX=n where n is a number between 0 and 12. Results will then be displayed to that number of decimal places. To return to the default, type FIX= without a number.

So by typing FIX=3 at the CALC prompt, the calculation above would return the answer 3.111

Any number of levels of brackets may be used in the calculation.
I'm not sure the calculator is working properly with FIX= as it isn't displaying only the significant digits. Maybe this is a bug?
User avatar
Martin
Global Admin
Posts: 442
Joined: Mon Jan 02, 2023 5:18 pm

Re: Quick quiz/puzzle

Post by Martin »

Hi again Andrew

There is an error in the CM/XP Manual which states
You can have from 0 to 11 decimal places. To return to the normal setting (11) type only FIX=

Whereas the LZ manual suggests..
You can have from 0 to 12 decimal places. To return to normal type only FIX=

In fact on both FIX=12 is the maximum and FIX= 'turns off' fix altogether and returns to 'general mode' allowing Exponent to be used.

By the way I didn't get anywhere with them without my CALCulator..

I had to mess with this for a while before I accepted that this is zero

FIX=
5*10**-20
=5.000000000E-20

FIX=12
5*10**-20
=0.000000000000
amenjet
Posts: 432
Joined: Tue Jan 03, 2023 7:54 pm

Re: Quick quiz/puzzle

Post by amenjet »

The reason that I posted the original quiz was that, even having used Organisers from the 80s, I didn't realise that the exponent displays with either a + or a -. I wrote the NewOPL code for displaying the exponent and scanning the exponent and had no sign for positive and a - for negative. That was, of course, wrong: the organiser displays a + for positive exponents. The quiz did then lead to some other slightly odd behaviour...
Post Reply