pike.git / src / modules / Math / math_module.c

version» Context lines:

pike.git/src/modules/Math/math_module.c:1:   /* -  * $Id: math_module.c,v 1.7 2001/07/16 13:20:32 grubba Exp $ +  * $Id: math_module.c,v 1.8 2001/07/31 19:31:22 marcus Exp $    */      #include "global.h"   #include "config.h"   #include "program.h"      #include "math_module.h"      /* must be included last */   #include "module_magic.h"
pike.git/src/modules/Math/math_module.c:47:       exit_math_matrix();    exit_math_imatrix();    exit_math_fmatrix();    exit_math_smatrix();   }      void pike_module_init(void)   {    int i; +  DECLARE_INF +  DECLARE_NAN       for (i=0; i<(int)(sizeof(sub)/sizeof(sub[0])); i++)    {    struct program *p;       start_new_program();    sub[i].func();    p=end_program();    add_program_constant(sub[i].name,p,0);    if (sub[i].pd) sub[i].pd[0]=p;    else free_program(p);    }       add_float_constant("pi",3.14159265358979323846 ,0);    add_float_constant("e", 2.7182818284590452354 ,0); -  +  add_float_constant("inf", MAKE_INF(1), 0); +  add_float_constant("nan", MAKE_NAN(), 0);   }