Changeset 2996


Ignore:
Timestamp:
Jun 1, 2012, 8:33:29 PM (23 months ago)
Author:
wmb
Message:

FCode tokenizer - removed the macro versions of */ and */mod, which do not work correctly (the intermediate result can overflow). If you need to use these functions in an FCode driver, use um* and um/mod to perform the calculations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ofw/tokenizer/crosslis.fth

    r1 r2996  
    141141: 2-    2 - ; 
    142142: <<a   << ; 
    143 : */mod  >r * r> /mod ; 
    144 : */     >r * r> /    ; 
     143\ These are not correct because the intermediate overflows. 
     144\ If you need these functions, write them explicitly using um* and um/mod 
     145\ : */mod  >r * r> /mod ; 
     146\ : */     >r * r> /    ; 
    145147: xu>l        ( ux -- ul ) drop   ;                    \       64 -> 32 
    146148: lu>x        ( ul -- ux ) 0      ;                    \ 32 -> 64 
Note: See TracChangeset for help on using the changeset viewer.