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&#39;Aprano,</div>

<div>&nbsp;
<div>
<div>I had - tried - in my mail to point out the only approximate accuracy of pi(), but assumed that pi() should basically represent &#120587;, and not be a deliberately deviating other value.&nbsp;<br/>
I think this view has its justification since: &nbsp;<br/>
- it intuitively imposes itself to &#39;simple minded users&#39; ( which I like to use for evaluation of software quality ),&nbsp;<br/>
- the gnumeric manual in the functions section explicitly says: &#39; PI - the constant &#120587; &#39; ( https://help.gnome.org/users/gnumeric/stable/gnumeric.html#CATEGORY_Mathematics ),&nbsp;<br/>
- pi() in the long version of gnumeric has the value<br/>
3.141592653589793238(5...) instead of the double variant&nbsp;<br/>
3.141592653589793(1...). &nbsp;<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 &#39;long&#39; ). &nbsp;<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. &nbsp;<br/>
Having the same result as MS Excel and LO Calc is considerable reg. compatibility, and a proof for not being totally wrong, it&#39;s not! a proof for being correct.&nbsp;<br/>
( LO Calc and MS Excel drop the decimal digits behind 15th as they are not guaranteed to be correct in all ranges. )&nbsp;<br/>
&gt; If you use sin(mod(2.9, 2.9)) you get 0 too, but that doesn&#39;t mean that<br/>
sin(2.9) should give 0.<br/>
&nbsp;&nbsp;&nbsp; that&#39;s not qualified argumenting, the absolute value of sin( x ) is not periodical by 2.9&nbsp;<br/>
But - as I anticipated - one can argue about such for a long time ...&nbsp;</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>&nbsp;Sonntag, 29. Mai 2022 um 11:43 Uhr<br/>
<b>Von:</b>&nbsp;&quot;Steven D&#39;Aprano&quot; &lt;[email protected]&gt;<br/>
<b>An:</b>&nbsp;&quot;newbie nullzwei via gnumeric-list&quot; &lt;[email protected]&gt;<br/>
<b>Betreff:</b>&nbsp;Re: Re: no tests for trigonometric functions? need help / hints how to adapt tests for gnumeric &#39;long&#39; version,</div>

<div>On Sun, May 29, 2022 at 11:14:02AM +0200, newbie nullzwei via gnumeric-list wrote:<br/>
<br/>
&gt; the result of sin(x) for x = pi() in gnumeric is 1.2246467991473532E-16,<br/>
&gt; and thus somewhat off from the correct value &#39;0&#39;.<br/>
<br/>
That is incorrect.<br/>
<br/>
sin(&pi;) = 0 but pi != &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==--