Re: Computing exp(z)
- From: lindahl@xxxxxxx (Greg Lindahl)
- Date: 19 May 2005 17:12:04 -0700
In article <d6iruv$3ag$1@xxxxxxxxxxxxxxxx>,
Tim Prince <tprince@xxxxxxxxxxxxxxxxxxxx> wrote:
>The complex absolute value part of this can be quite slow, if it is done
>carefully and without taking advantage of extended precision/range. If not
>done carefully, it could break for |z| > 1e19. It will be quite difficult
>to do this correctly and still beat CVF performance.
SGI discovered long ago that a lot of code seems to use complex
numbers that are always small enough in absolute value to be able to
take the shortcut and not overflow. So they (and we) have a command
line option for this assertion (-OPT:fast_complex=ON). For example, if
you're doing phyics, and you *know* the maximum amplitude your
detector can emit...
This option isn't part of any of our bundles of options because it's
unsafe in general.