Dnia 30 listopada 2021 08:38:27 CET, "Peter J. Philipp" <p...@delphinusdns.org> 
napisał/a:
>In fact it's not just bc -l, but also when I calculate the following in C
>(linked with -lm)
>
>                C = (180.0 - A) - B;
>                a = (double)(c / sin(C)) * sin(A);
>                b = (double)(c / sin(C)) * sin(B);
>
>Some may recognize this as parts of the Law of Sines.
>
>pjp@neptune$ bc -l
>(9 / s(70)) * s(76)
>6.58357679385302895866
>
>When I do it with xcalc I get the correct 9.2931043.
>
>What am I doing wrong?  How must I massage my system the correct way?
>The wrong number was observed on arm64 (bc -l) and amd64 (CGI).
>
>Best Regards,
>-peter
>

>From what I know, in C, sin takes input in radians.

Most likely bc does the same, and then xcalc probably automatically converts 
input to radians before passing it to sin().

Kind regards
--
Łukasz Moskała

Reply via email to