Ignore:
Timestamp:
Sep 9, 2012, 4:55:26 PM (7 years ago)
Author:
sam
Message:

math: refactor real number constant declarations so that they are only
computed on demand with static initialisation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/math/pi.cpp

    r1647 r1893  
    2424int main(int argc, char **argv)
    2525{
    26     printf("Pi: "); real::R_PI.print();
    27     printf("e: "); real::R_E.print();
    28     printf("ln(2): "); real::R_LN2.print();
    29     printf("sqrt(2): "); real::R_SQRT2.print();
    30     printf("sqrt(1/2): "); real::R_SQRT1_2.print();
     26    printf("Pi: "); real::R_PI().print();
     27    printf("e: "); real::R_E().print();
     28    printf("ln(2): "); real::R_LN2().print();
     29    printf("sqrt(2): "); real::R_SQRT2().print();
     30    printf("sqrt(1/2): "); real::R_SQRT1_2().print();
    3131
    3232    /* Gauss-Legendre computation of Pi -- doesn't work well at all,
Note: See TracChangeset for help on using the changeset viewer.