ECL uses tanf() for computing the tangent with single-floats. If you have a look at the code in ecl/src/c/numbers/tan.d you will find the lines below. One possibility would be to uncomment safe_tanf() and see whether ECL now works. If this is the case then we might have to add another switch for your platform :-/

 * As of 2006-10-13 I found this bug in GLIBC's tanf, which overflows
 * when the argument is pi/4. It is 2008 and this has not yet been
 * solved. Not only that, but if we use tan() on float, GCC automatically
 * and stupidly forces the use of tanf().
#if defined(__amd64__) && defined(__GLIBC__)
static double safe_tanf(double x) { return tan(x); }
# define safe_tanf(x) tanf(x)

On Thu, Mar 28, 2013 at 11:50 PM, Eric Marsden <> wrote:

I have recently acquired a cubieboard, a small ARM Cortex-A8 development
board (ARM v7, NEON, VFPv3), on which I run the rasbpian Debian
derivative. It's using GCC 4.6.3 and runs fine under ECL, except for a
bug in TAN:

| ;;; Loading #P"/usr/local/lib/ecl-12.12.1/asdf.fas"
| ECL (Embeddable Common-Lisp) 12.12.1 (git:e90ff5a6c720334e0450a107bb0bdc1fd746d5ea)
| Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
| Copyright (C) 1993 Giuseppe Attardi
| Copyright (C) 2000 Juan J. Garcia-Ripoll
| ECL is free software, and you are welcome to redistribute it
| under certain conditions; see file 'Copyright' for details.
| Type :h for Help.
| Top level in: #<process TOP-LEVEL>.
| > (tan (coerce (/ pi 4) 'double-float))
| 0.9999999999999999d0
| > (tan (coerce (/ pi 4) 'single-float))

A basic C program which prints tan(atan(1)) works fine. What can I do to
help to debug?

Eric Marsden

Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13.
Ecls-list mailing list

Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)