[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[newbie] unexpected behaviour for x^x
From: |
Jean Dubois |
Subject: |
[newbie] unexpected behaviour for x^x |
Date: |
Fri, 12 Dec 2014 13:16:55 +0100 |
I was surprised to found out that when I calculated x^x with octave,
using floats which
approach zero I get two different results depending on the direction
in which zero is approached, this is what I mean:
octave:1> 0.001^0.001
ans = 0.99312
octave:2> -0.001^-0.001
ans = -1.0069
For real numbers calculating this limit algebraically gives 1
(independent of the direction). What's the cause of this?
thanks
jean
- [newbie] unexpected behaviour for x^x,
Jean Dubois <=