[clean-list] Power again

John van Groningen johnvg@cs.kun.nl
Mon, 10 May 2004 17:25:34 +0200


Alexsandro Soares wrote:
>Hi Vicent,
> 
>   What about
>        (-2.0)^(2.0) ?
>
>  My math background tells me that the correct value
>must be 4.0, but Clean answers -4.0. Who is wrong?

This is bug in Clean 2.1 on windows. The ^ function yields an incorrect
result if a negative number to the power of an even number is computed.

To fix this, you can download

http://www.cs.kun.nl/~clean/download/Clean21/windows/patch_power.zip

and replace 3 files inside the Libraries\StdEnv 2.1.0\Clean System Files
folder with the new ones in this .zip file.

Regards,

John van Groningen