NO

Author Topic: Floating-point expression too complex  (Read 4951 times)

CLR

  • Guest
Floating-point expression too complex
« on: December 15, 2004, 11:16:09 PM »
Hello

I'm getting the error 'Floating-point expression too complex' when compiling  spidermonkey

The error is at line 320:
http://lxr.mozilla.org/seamonkey/source/js/src/fdlibm/e_pow.c#320

This is the command line I run
pocc.exe /D __STDC__ /D NDEBUG /D WIN32 /D _X86_=1 /D _WINDOWS /D _IEEE_LIBM /D XP_WIN /c .\fdlibm\e_pow.c

Should I add/change something?

Spidermonkey - Full download:
ftp://ftp.mozilla.org/pub/mozilla.org/js/js-1.5-rc6a.tar.gz

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Floating-point expression too complex
« Reply #1 on: December 16, 2004, 01:10:25 AM »
It looks like the reported line is a bit off. The real problem seems to be with line 295, and the following expression:

Code: [Select]

r = s2*s2*(L1+s2*(L2+s2*(L3+s2*(L4+s2*(L5+s2*L6)))));


The compiler gets annoyed because too many values are pushed onto the floating-point stack at one time. The original LCC compiler isn't very good at this, and I havn't done much about it (since I never use floating-point math).

It could be, for example, changed to the following - which will help the compiler.

Code: [Select]

r = s2*s2*(s2*(s2*(s2*(s2*(s2*L6+L5)+L4)+L3)+L2)+L1);


I will try and do something to the next release. It's the best I can do.

Pelle
/Pelle

CLR

  • Guest
Floating-point expression too complex
« Reply #2 on: December 16, 2004, 01:38:29 AM »
OK. Thank you.

john

  • Guest
Floating-point expression too complex
« Reply #3 on: December 27, 2004, 11:26:45 PM »
lcc-win32 doesn't have problems with that