[Scilab-users] {EXT} Problems arising from truncation of %pi

Dang Ngoc Chan, Christophe Christophe.Dang at sidel.com
Wed Jan 6 08:46:08 CET 2021


Hello Federico,

I'm not sure to understand exactly your needs but:

> De : Federico Miyara
> Envoyé : mardi 5 janvier 2021 09:20
>
> --> sin(%pi)
> ans  =
>   0.0000000000000001224647

seems to be something we cannot get rid off unless using symbolic calculation i.e. having a specific variable for pi which is recognised and gives the exact result with given functions.

> 1) How is the sin() function extended to very large values of the argument?

I don’t know about Scilab but as it is initially based on Fortran, it probably uses the related Fortran library (or maybe a more modern library, this is not documented).
You might have some answers here:

https://en.wikipedia.org/wiki/Sine#Software_implementations

Hope this helps,

Regards

--
Christophe Dang Ngoc Chan
Mechanical calculation engineer


General
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


More information about the users mailing list