From: pito <pi...@vo...> - 2010-10-02 11:48:39
|
Hi, in case of "1.234e" "1.234" "1.234e0" string>float drops the "0" exp from rstack : : string>float ( c-addr u-length -- f ) \ get exponent first -- this is the number that follows e, E, d, or D 101 extract dup 0= if drop \ 'e' 69 extract dup 0= if drop \ 'E' 100 extract dup 0= if drop \ 'd' 68 extract dup 0= \ 'D' ##### <<< Pito: dup 0= if then then then \ ##### <<< Pito: then then then then >r ( adr length, R: exp ) .... and the: \ now, shift according to exp r> dup 0= if drop else returns a wrong result. With #### up there it returns "0" from rstack (an error from partnumber but a correct exp) which "could be taken" as a good exp ("0" in those cases) so we may get the right result for above floats (when "now, shift according to exp" will be changed somehow). P. |