Floating point bug in Canon F789SGA

11302014, 07:32 PM
Post: #1




Floating point bug in Canon F789SGA
I recently bought a Canon F789SGA calculator because its specification intriguingly mentions that it has 18 digit precision. Tests show that it actually has 20 digit internal precision, and transcendental functions actually achieve this precision. That is the nice part.
Unfortunately, the calculator has bugs in its floating point operations. It took me a while to figure out what was going on, since there are several bugs that interact in unobvious ways. The main bug is an error in floating point addition. When doing a floating point addition A+B, if the difference in exponents between the two numbers A and B is 16, 17, 18, or 19, and if the lower four digits of the larger number are 0000, then the smaller number is not added in. That is, the lower four digits of the result stay 0000. For example, doing the addition 1 + 1E16 gives exactly 1 instead of 1.0000000000000001. Floating point subtraction has a similar bug. There are other irregularities in the floating point operations, in particular, the value of the last (20th) digit also plays a role. My guess to the origin of this bug is that the calculator is an improved version of a Casio calculator with 16 digit precision. Possibly the internal precision was increased without proper testing. Has anyone else found similar bugs in these or other recent calculators? 

11302014, 08:36 PM
Post: #2




RE: Floating point bug in Canon F789SGA
Other than this bug, this model compares favorably to the Casio FX115ES Plus, Sharp ELW516B (or X) and TI TI36X Pro with some features the others do not have.
How do the buttons feel? 

12012014, 10:20 AM
Post: #3




RE: Floating point bug in Canon F789SGA
(11302014 08:36 PM)Steve Simpkin Wrote: Other than this bug, this model compares favorably to the Casio FX115ES Plus, Sharp ELW516B (or X) and TI TI36X Pro with some features the others do not have. The buttons are not the best I have seen, but they are usable. They do not detract from the use of the calculator. 

12052014, 02:20 PM
Post: #4




RE: Floating point bug in Canon F789SGA
(11302014 07:32 PM)Peter Van Roy Wrote: I recently bought a Canon F789SGA calculator because its specification intriguingly mentions that it has 18 digit precision. Tests show that it actually has 20 digit internal precision, and transcendental functions actually achieve this precision. That is the nice part. i'm not sure it's a bug. Handbook says: "Precision +/ 1 at the 10th digit for a single calculation +/ 1 at the least significant for exponential display" (page 10) which I don't really understand, but could imply you are requiring accuracy above specifications. Specs are certainly exceeded by the PFact function, where the greatest factor is declared "unfactored" whether prime or composite  in fact, the greatest factor found is prime for all values < 1009^2. Overall a pleasant calculator & accurate & integration is annoyingly slow. 

12052014, 09:39 PM
Post: #5




RE: Floating point bug in Canon F789SGA
(12052014 02:20 PM)Gerald H Wrote: i'm not sure it's a bug. The specification says clearly that internal precision is 18 digits (see page 11 of F789SGA Scientific Calculator User Instructions). It is quite common for calculators to have higher internal precision than what they display. My observations show that floating point addition has a bug at the 17th and 18th digits. 

12062014, 06:37 AM
(This post was last modified: 12062014 06:43 AM by Gerald H.)
Post: #6




RE: Floating point bug in Canon F789SGA
(12052014 09:39 PM)Peter Van Roy Wrote:(12052014 02:20 PM)Gerald H Wrote: i'm not sure it's a bug. Can't find the referenced text in "User Instructions" EIM2725 page 11 nor in f789sga.pdf EIE455 page 11. 

12092014, 07:38 PM
(This post was last modified: 12092014 07:40 PM by Peter Van Roy.)
Post: #7




RE: Floating point bug in Canon F789SGA
(12062014 06:37 AM)Gerald H Wrote: Can't find the referenced text in "User Instructions" EIM2725 page 11 nor in f789sga.pdf EIE455 page 11. It's on the bottom of page 10 in EIE455, the first entry in the first table in section Input Range and Error Messages. It's page 11 when viewing the pdf document but numbered as page 10 on the page itself. 

12102014, 06:35 AM
Post: #8




RE: Floating point bug in Canon F789SGA
(11302014 07:32 PM)Peter Van Roy Wrote: I recently bought a Canon F789SGA calculator because its specification intriguingly mentions that it has 18 digit precision. Tests show that it actually has 20 digit internal precision, and transcendental functions actually achieve this precision. That is the nice part. (12092014 07:38 PM)Peter Van Roy Wrote:(12062014 06:37 AM)Gerald H Wrote: Can't find the referenced text in "User Instructions" EIM2725 page 11 nor in f789sga.pdf EIE455 page 11. No  in the pdf on page 10 "Nr of digits for internal calc : Up to 18", spec met by trig funcs & everything else too, as "up to" is a guarantee of nothing. In "Calculation Examples" paper document, example #6, page 4, Nr digits for internal prec 18 BUT also +/ 1 at the 10th digit. You can accuse Canon of sloppy, unclear documentation but I don't think the claim of calc not fulfilling specs is warranted. 

12132014, 06:17 PM
Post: #9




RE: Floating point bug in Canon F789SGA
(12102014 06:35 AM)Gerald H Wrote: You can accuse Canon of sloppy, unclear documentation but I don't think the claim of calc not fulfilling specs is warranted. Independent of whatever the spec claims or not, it is a fact that this calculator has bugs in its basic floating point operations. Caveat emptor if you want to use this calculator for any important computations. 

12142014, 06:43 AM
Post: #10




RE: Floating point bug in Canon F789SGA
(12132014 06:17 PM)Peter Van Roy Wrote:(12102014 06:35 AM)Gerald H Wrote: You can accuse Canon of sloppy, unclear documentation but I don't think the claim of calc not fulfilling specs is warranted. Certainly "Caveat calculator" when the calculator (in Latin he was a person, female calculatrix) uses an electrical friend to calculate. The Canon machine is still better than using extended reals in the HP 48G  I've tested this. As for comparisons of most calculation results on the current offerings I'd like to know more. 

02042018, 04:01 AM
(This post was last modified: 02052018 01:59 PM by daschel.)
Post: #11




RE: Floating point bug in Canon F789SGA
(12132014 06:17 PM)Peter Van Roy Wrote:(12102014 06:35 AM)Gerald H Wrote: You can accuse Canon of sloppy, unclear documentation but I don't think the claim of calc not fulfilling specs is warranted. Hello, and my apologies if this thread has long been forgotten. But I have some findings which might change your perspective on this. I came across your post and tried your original test on a Canon F792SGA, as well as with an HP 33s. And they both showed a loss of accuracy before their respective internal precision limits were reached. The Canon (as you've already shown) loses precision with anything smaller than 1E15, despite it's reputed 18digit accuracy. This is not to be disputed; my results were exactly the same as yours. But it might surprise you that the HP 33s 'fails' your test with exponents lesser than 11. And this is in spite of its 15digits of internal accuracy. It seems to me that you had singled out the Canon F792SGA while other reputable (and pricier) calculators didn't fare any better, as they both fall short 3—5 digits of what would be expected, given their specs. Note: I asked the owner of an HP 35s to run the same test on his calculator and he notifed me of similar results. To say the Canon isn't worthy of "serious" computations based your test is to impugn the functionality of other wellrespected calculators; I seriously doubt you'll find too many mathematicians, engineers or statisticians who'd agree that the HP 33s isn't up to serious work—despite it falling short of anticipated results. The same courtesy must therefore be extended to the Canons. I suspect the width of temporary memory registers and legacy numerical libraries might all play a role in causing this. But the Canon F792SGA is not to be faulted on this point, especially when compared with other "serious" calculators. I hope you've found enjoyment with your F792SGA, or with another model that suits your requirements. Based on my experiment, I'm inclined to agree with the other poster who describes this as a documentation—but not a technical—problem. 

07172018, 12:55 AM
Post: #12




RE: Floating point bug in Canon F789SGA
Floating point bug is actually a "feature" (put inside intentionally).
http://people.ku.edu/~wzhuang/CAMseminar...ecrets.pdf Without this "feature", they might get many customer complains: https://www.askvg.com/microsoftwindowscalculatorbug/ It is handholding feature for people don't understand floating point. They expected sqrt(4)  2 = 0, not some tiny tiny number. But, allowing calculator to "fix" the values, the final result is not as precise. The medicine is worse than the cure ... 

07172018, 04:08 PM
Post: #13




RE: Floating point bug in Canon F789SGA
This calculator totally looks like a Casio, did you try the self test with shift+on+7 then 9 (or 8) ?


07172018, 05:27 PM
Post: #14




RE: Floating point bug in Canon F789SGA  
« Next Oldest  Next Newest »

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