When using the new _LTX operator, I found that if one of the values in the camparison is smaller than 1e-18, for example "x _LTX y" where x=1e-26, the program hangs.
Since the IEEE standard for small numbers has been 1e-32 for more than 20 years (and EXCEL can handle numbers as small as 1e-1032), I hope that this can be remedied. For our work this is absolutely necessary.
Steve-
Are you using the ICONV'd version of these numbers?
Mike
Dear Mike,
In the documentation there is no mention of ICONVing anything:
The Extended Precision mathematical operators have been added into
Basic+: _EQX, _LTX, _LEX, _NEX, _GTX, _GEX, for equal, less than, less than or equal, not equal, greater than, greater than or equal, respectively. They should be used when doing comparisons on numerics with more than four (4) decimal places.(7.2.1)
I tried the following program:
function test()
stime=time()
for i=1 to 10000000
x=1e-26y=1e-27if iconv(x,'MS') <= iconv(y,'MS') then z=1 else z=0next i
return time()-stime
which completed hung up the system. Please advise on the proper use of ICONV.
By the way, if I replace the expression "iconv(x,'MS')" with "x*1e32", and similarly the "y" expression, the program runs in 9 seconds. I hope that ICONVing will be faster.
Slight correction, my programming line was:
if iconv(x,'MS') _LTX iconv(y,'MS') then z=1 else z=0
not
if iconv(x,'MS') ⇐ iconv(y,'MS') then z=1 else z=0
Dear Mike,
Could someone answer my questions, please?
Not to muddy the waters, but I can't replicate this in OI 7.2.1.
x=1e-26 y=1e-27 XltxY=( x _ltx y ) XgtxY=( x _gtx y )XltxY returns 0; XgtxY returns 1 - as expected. Am I missing something here?
Cheers, M@
[img]http://www.vernonsystems.com/images/logo_main_ani.gif[/img]
same here .. 7.2.1