Changeset 184 for trunk/thune/math.c

Show
Ignore:
Timestamp:
06/12/06 01:58:22 (3 years ago)
Author:
krobillard
Message:

Thune -

Word lookup now uses an ordered binary search.
Renamed ur_setType as ur_initType.
Some error reporting improvements in eval.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/math.c

    r132 r184  
    4343            ur_decimal(tos) = func( ur_decimal(tos) ); \ 
    4444    } else if( ur_is(tos, UT_INT) ) { \ 
    45         ur_setType(tos, UT_DECIMAL); \ 
     45        ur_initType(tos, UT_DECIMAL); \ 
    4646            ur_decimal(tos) = func( (double) ur_int(tos) ); \ 
    4747    } 
     
    5656    else if( ur_is(tos, UT_INT) ) 
    5757        { 
    58         ur_setType(tos, UT_DECIMAL); 
     58        ur_initType(tos, UT_DECIMAL); 
    5959        ur_decimal(tos) = conv * ur_int(tos); 
    6060        } 
     
    125125    else 
    126126    { 
    127         ur_setType( tos, UT_DECIMAL ); 
     127        ur_initType( tos, UT_DECIMAL ); 
    128128        ur_decimal(tos) = mathSqrt( (double) ur_int(tos) ); 
    129129    } 
     
    435435    ur_globalCtx( ctx ); 
    436436    val = ur_intern( &ctx, "pi", 2, 0 ); 
    437     ur_setType( val, UT_DECIMAL ); 
     437    ur_initType( val, UT_DECIMAL ); 
    438438    ur_decimal(val) = PI; 
    439439