Anonymous user
Talk:Fast Fourier transform: Difference between revisions
scala: exp function
(→scala: new section) |
(scala: exp function) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 61:
== scala ==
Hey, I rewrote the Scala implementation since it needed attention. I think it is much more readable now, but there are two places that could be more idiomatic, and I should probably put an @tailrec hint in there somewhere.
Does Scala really not have a standard complex math library? Surprising...
--[[User:BooleanLobster|BooleanLobster]] ([[User talk:BooleanLobster|talk]]) 2014-04-27
I prefer to declare exp as a method of the Complex class:
<lang scala>def exp = Complex(cos(im), sin(im)) * (cosh(re) + sinh(re))</lang>
Invocations become z.exp instead of exp(z)
--[[User:Jolkdarr|Jolkdarr]] ([[User talk:Jolkdarr|talk]]) 2015-11-15
|