[erlang-questions] math:pow(X, Y).

Matthias Lang matthias@REDACTED
Wed Mar 21 12:52:49 CET 2012

On Wednesday, March 21, Richard O'Keefe wrote:

> 1> 1.0e200 * 1.0e200.
> ** exception error: bad argument in an arithmetic expression
>      in operator  */2
>         called as 1.0e200 * 1.0e200

> What _is_ questionable is that all the arguments are perfectly OK; the
> problem is *not* a bad argument but a floating point overflow,
> and so it should be labelled.

It's "just" the error message pretty-printer which makes it look like
a bad argument. The real error is actually a 'badarith':

  1> catch 1.0e200 * 1.0e200.


More information about the erlang-questions mailing list