[clean-list] cosh broken

John van Groningen johnvg@cs.kun.nl
Thu, 19 Dec 2002 14:34:49 +0100


G.W.M. Vissers wrote:
>The hyperbolic cosine function is off by a factor of 4 in the Clean 2.02 
>Linux distribution.

Yes, and not just in the Linux distribution, but probably in all distributions.
This is caused by a typo in StdReal.icl, where the instance of cosh for
Reals contains a multiplication by 2.0, instead of a division.

This can be fixed easily by replacing '* 2.0' by '* 0.5' in StdReal.icl
using an editor.

On Linux or Solaris this file is usually not installed in lib/stdenv,
so you should first copy the StdReal.icl file from the stdenv directory
from the Clean2.0.2.tar.gz file to the lib/stdenv directory
and then edit this file.

If you don't use the heap or time profiler you can then execute
clm -ABC StdReal
to generate a fixed StdReal.abc file. clm should then later generate
a new StdReal.o file automatically.
If you wan't to use the profilers (only possible with the CleanIDE,
not with clm), you should generate StdReal.abc using the CleanIDE
in the same way as for Windows and Macintosh systems, as follows.

On Windows an Macintosh systems you should open StdReal.icl inside
a project for which you have enabled both time and heap profiling.
Then replace the '* 2.0' by '* 0.5' and then compile StdReal.icl.

Regards,

John van Groningen
University of Nijmegen