Aw: Re: Re: no tests for trigonometric functions? need help / hints how to adapt tests for gnumeric 'long' version,
newbie nullzwei via gnumeric-list <[email protected]> Sun, 29 May 2022 23:01:13 +0200
| Newsgroups | gmane.comp.gnome.apps.gnumeric |
|---|---|
| Message-ID | <trinity-2f431798-6464-4046-86b9-79c1d4b48e77-1653858073485@3c-app-gmx-bs35> |
--===============3294902860077772151== Content-Type: text/html; charset=UTF-8 <html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div><br/> hello @Steve D'Aprano,</div> <div> <div> <div>I had - tried - in my mail to point out the only approximate accuracy of pi(), but assumed that pi() should basically represent 𝜋, and not be a deliberately deviating other value. <br/> I think this view has its justification since: <br/> - it intuitively imposes itself to 'simple minded users' ( which I like to use for evaluation of software quality ), <br/> - the gnumeric manual in the functions section explicitly says: ' PI - the constant 𝜋 ' ( https://help.gnome.org/users/gnumeric/stable/gnumeric.html#CATEGORY_Mathematics ), <br/> - pi() in the long version of gnumeric has the value<br/> 3.141592653589793238(5...) instead of the double variant <br/> 3.141592653589793(1...). <br/> And with all that I thought it considerable to give a result to the users which - by error cancellation - is also school-mathematically meaningful. And would like that better than to argue whether sin(pi()) is 1.2246467991473532E-16 ( double version ) or -5.0165576126683320235E-20 ( gnumeric 'long' ). <br/> With the substitution solution one gets consistent results between school mathematics and FP systems which calculate with different accuracy in a quite good range. This seems to me simply meaningful and the correct way. <br/> Having the same result as MS Excel and LO Calc is considerable reg. compatibility, and a proof for not being totally wrong, it's not! a proof for being correct. <br/> ( LO Calc and MS Excel drop the decimal digits behind 15th as they are not guaranteed to be correct in all ranges. ) <br/> > If you use sin(mod(2.9, 2.9)) you get 0 too, but that doesn't mean that<br/> sin(2.9) should give 0.<br/> that's not qualified argumenting, the absolute value of sin( x ) is not periodical by 2.9 <br/> But - as I anticipated - one can argue about such for a long time ... </div> <br/> :-)<br/> <br/> <br/> <br/> b.s.<br/> <br/> --- <div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);"> <div style="margin: 0 0 10.0px 0;"><b>Gesendet:</b> Sonntag, 29. Mai 2022 um 11:43 Uhr<br/> <b>Von:</b> "Steven D'Aprano" <[email protected]><br/> <b>An:</b> "newbie nullzwei via gnumeric-list" <[email protected]><br/> <b>Betreff:</b> Re: Re: no tests for trigonometric functions? need help / hints how to adapt tests for gnumeric 'long' version,</div> <div>On Sun, May 29, 2022 at 11:14:02AM +0200, newbie nullzwei via gnumeric-list wrote:<br/> <br/> > the result of sin(x) for x = pi() in gnumeric is 1.2246467991473532E-16,<br/> > and thus somewhat off from the correct value '0'.<br/> <br/> That is incorrect.<br/> <br/> sin(π) = 0 but pi != π, it is (approximately) 3.141592653589793... and<br/> sin(pi) != 0.<br/> <br/> ...</div> </div> </div> </div></div></body></html> --===============3294902860077772151== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ gnumeric-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/gnumeric-list --===============3294902860077772151==--