You need format %Lf here.

welinder@dicentra:~> gcc -O -Wall ttt.c
welinder@dicentra:~> ./a.out
outputs: 0.077979


Morten


On Wed, Feb 28, 2018 at 10:15 AM, Jason Martin <agrel...@gmail.com> wrote:
> On OpenIndiana trying to update:
>
> goffice-0.10.35 to goffice-0.10.38
>
> test-math.c is failing for me
>
> test-math.log
>
> sinpi(0) = 0  [0]
> cospi(0) = 1  [1]
> tanpi(0) = 0  [0]
> cotpi(0) = nan  [nan]
> atanpi(0) = 0  [0]
> sinpil(0) = 0  [0]
> cospil(0) = 1  [1]
> tanpil(0) = 0  [0]
> cotpil(0) = nan  [nan]
> atanpil(0) = 0  [0]
> sinpi(-0) = -0  [-0]
> cospi(-0) = 1  [1]
> tanpi(-0) = -0  [-0]
> cotpi(-0) = -nan  [-nan]
> atanpi(-0) = -0  [-0]
> sinpil(-0) = -0  [-0]
> cospil(-0) = 1  [1]
> tanpil(-0) = -0  [-0]
> cotpil(-0) = -nan  [-nan]
> atanpil(-0) = -0  [-0]
> sinpi(0.125) = 0.382683  [0.382683]
> cospi(0.125) = 0.92388  [0.92388]
> tanpi(0.125) = 0.414214  [0.414214]
> cotpi(0.125) = 2.41421  [2.41421]
> atanpi(0.125) = 0.0395834  [0.0395834]
> sinpil(0.125) = 0.382683  [0.382683]
> cospil(0.125) = 0.92388  [0.92388]
> tanpil(0.125) = 0.414214  [0.414214]
> cotpil(0.125) = 2.41421  [2.41421]
> atanpil(0.125) = 0.0395834  [0.0395834]
> sinpi(-0.125) = -0.382683  [-0.382683]
> cospi(-0.125) = 0.92388  [0.92388]
> tanpi(-0.125) = -0.414214  [-0.414214]
> cotpi(-0.125) = -2.41421  [-2.41421]
> atanpi(-0.125) = -0.0395834  [-0.0395834]
> sinpil(-0.125) = -0.382683  [-0.382683]
> cospil(-0.125) = 0.92388  [0.92388]
> tanpil(-0.125) = -0.414214  [-0.414214]
> cotpil(-0.125) = -2.41421  [-2.41421]
> atanpil(-0.125) = -0.0395834  [-0.0395834]
> sinpi(0.25) = 0.707107  [0.707107]
> cospi(0.25) = 0.707107  [0.707107]
> tanpi(0.25) = 1  [1]
> cotpi(0.25) = 1  [1]
> atanpi(0.25) = 0.0779791  [0.0779791]
> sinpil(0.25) = 0.707107  [0.707107]
> cospil(0.25) = 0.707107  [0.707107]
> tanpil(0.25) = 1  [1]
> cotpil(0.25) = 1  [1]
> **
> ERROR:/export/home/agrellum/oi-userland/components/library/goffice/goffice-0.10.38/tests/test-math.c:106:trig_tests:
> assertion failed: (r == fa)
> FAIL test-math (exit status: 134)
>
> I think the next call would be atanpil at 0.25
>
> and it is excepting both sides to be 0.077979
>
> Going through the source and man pages:
>
> A sample shows:
>
>
> #include <stdio.h>
> #include <math.h>
>
> int main (int argc, char **argv)
> {
>     long double x;
>     x=0.25;
>     printf("outputs: %f \n", atanl (x) / M_PI);
>     // Output: ``outputs: -0.000000``
>
>     return 0;
> }
>
>
> gcc -std=gnu99 -lm sample.c
> ./a.out
>
> outputs: -0.000000
>
>
>
> _______________________________________________
> gnumeric-list mailing list
> gnumeric-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gnumeric-list
>
_______________________________________________
gnumeric-list mailing list
gnumeric-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gnumeric-list

Reply via email to