Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make log(0) return the correct result, -Inf
Signed-off-by: pmichaud <pmichaud@pobox.com>
  • Loading branch information
leto authored and pmichaud committed Feb 25, 2009
1 parent 0316676 commit 9fe6dfd
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/builtins/any-num.pir
Expand Up @@ -77,12 +77,9 @@ error.
=cut

.sub 'log' :method :multi(_)
if self == 0 goto fail
$N0 = self
$N1 = ln $N0
.return ($N1)
fail:
.tailcall '!FAIL'("Can't take log of 0")
.end


Expand Down

0 comments on commit 9fe6dfd

Please sign in to comment.