Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 12 MAR 2006 11:54:45PM Steve Epstein wrote:

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.


At 13 MAR 2006 08:47AM Mike Ruane wrote:

Steve-

Are you using the ICONV'd version of these numbers?

Mike


At 13 MAR 2006 08:03PM Steve Epstein wrote:

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-26
y=1e-27
if iconv(x,'MS') <= iconv(y,'MS') then z=1 else z=0

next 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.


At 14 MAR 2006 09:16PM Steve Epstein wrote:

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


At 21 MAR 2006 09:54PM Steve Epstein wrote:

Dear Mike,

Could someone answer my questions, please?


At 22 MAR 2006 05:15PM Matthew Crozier wrote:

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]


At 22 MAR 2006 10:47PM dsig _at_ sigafoos.org wrote:

  • third_party_content/community/commentary/forums_works/219219ec200cb1b88525713000157e0c.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1