[Gambas-user] Sin(Rad(180)) = ?

vuott at tutanota.com vuott at tutanota.com
Fri Apr 16 16:28:15 CEST 2021


Ok, thank you, Tobias.




-- 
 Inviato in modo sicuro con Tutanota. Ottieni la tua casella di posta elettronica crittografata e senza pubblicità: 
 https://tutanota.com


16 apr 2021, 16:15 da tobs at taboege.de:

> On Fri, 16 Apr 2021, vuott--- via User wrote:
>
>> Hello,
>> excuse me, if I'm not mistaken, the sine of 180° = 0.
>>
>>    https://en.wikipedia.org/wiki/Sine#Properties_relating_to_the_quadrants
>>
>> But in Gambas with this:
>>
>>    Sin(Rad(180.0))   I obtain: 1.22464679914735E-16
>>
>> Why ?
>>
>
> Rounding errors. Notice that 1.2246E-16 = 0.00000000000000012246.
> This is very close to zero. Small errors happen with the limited
> precision of IEEE754 floating point numbers.
>
> Best,
> Tobias
>
> -- 
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210416/df06d0e3/attachment.htm>


More information about the User mailing list