> exp(-2 * atan(1))
[1] 0.2078796
> 1i ** 1i
[1] 0.2078796+0i1i is an imaginary number. We are discussing the difficulty in calculating i^i, not whether a language can do atan(1).
Many problems are quite challenging.
It might have been better for you to have been a little more direct-- "I like that exponentiation of complex types just works in Scheme; I don't think that works in other languages!"
I'm not sure why you think scheme is unique in being able to do this-- indeed, it's one of the examples of std::pow on cppreference:
https://en.cppreference.com/w/cpp/numeric/complex/pow
> std::cout << "i^i = " << std::pow(i, i) << '\n';
> i^i = (0.207880,0.000000)
I also hope it wasn't a way to humblebrag that you have a kid in middle school that knows math that lots of other people around here don't (having forgotten it from alg2/precalc or just having trouble reading your comment).
>>> from math import atan, exp
>>> exp(atan(1)*-2)
0.20787957635076193
>>> 1j*1j
(0.20787957635076193+0j)
Is your complaint just that some popular languages don’t have complex numbers as part of the core/stdlib?
1. At the REPL, if you type `T` (true), and you get back `T`, the test passes.
2. Define factorial. Then type `(/ (factorial 100) (factorial 99))`. If you get back 100, the test passes.
3. Type `(atanh -2)`. If you get a complex number, the test passes. If you get the correct complex number [namely -0.5493061443340549+1.5707963267948966i] extra credit. Far too many non-Lisp languages return NaN or throw an exception.
scheme@(guile-user) [5]> (exp (* (atan 1) -2))
$9 = 0.20787957635076193
scheme@(guile-user) [5]> (expt 0+1i 0+1i)
$10 = 0.20787957635076193+0.0i
a problem c/c++/java/js/python/rust/go can't handle after decades of progress. even my favorite R can't work this problem. scheme ftw.