Voici une courte liste d'implémentations et de langages que j'ai essayés. Il est trié par proximité de zéro :
- Schéma :
(+ 1 (make-polar 1 (atan 0 -1)))
- ⇒
0.0+1.2246063538223773e-16i
(Chez Scheme, MIT Scheme) - ⇒
0.0+1.22460635382238e-16i
(Ruse) - ⇒
0.0+1.22464679914735e-16i
(Poulet avecnumbers
oeuf) - ⇒
0.0+1.2246467991473532e-16i
(MzScheme, SISC, Gauche, Gambit) - ⇒
0.0+1.2246467991473533e-16i
(GDS)
- ⇒
- Lisp commun :
(1+ (exp (complex 0 pi)))
- ⇒
#C(0.0L0 -5.0165576136843360246L-20)
(CLISP) - ⇒
#C(0.0d0 1.2246063538223773d-16)
(CMUCL) - ⇒
#C(0.0d0 1.2246467991473532d-16)
(SBCL)
- ⇒
- Perl :
use Math::Complex; Math::Complex->emake(1, pi) + 1
- ⇒
1.22464679914735e-16i
- ⇒
- Python :
from cmath import exp, pi; exp(complex(0, pi)) + 1
- ⇒
1.2246467991473532e-16j
(CPython)
- ⇒
- Rubis :
require 'complex'; Complex::polar(1, Math::PI) + 1
- ⇒
Complex(0.0, 1.22464679914735e-16)
(IRM) - ⇒
Complex(0.0, 1.2246467991473532e-16)
(JRuby)
- ⇒
- R :
complex(argument = pi) + 1
- ⇒
0+1.224606353822377e-16i
- ⇒