On Tue, Nov 30, 2021 at 08:38:27AM +0100, Peter J. Philipp wrote:

> 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
> 

You are using degrees instead of radians.

        -Otto

Reply via email to