[squeak-dev] The Trunk: Kernel-nice.571.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Sat Apr 23 21:03:08 UTC 2011


Ah yes, arCosh is defined such that
.    x arCosh cosh = x
This is suggested by the tests provided.

Note that the opposite is not necessarily true.
( x cosh arCosh) can differ from x

This is expected because cosh is periodic along imaginary axis
.    (x + y i) cosh = (x negated + y i + Float twoPi i) cosh
so of course there are multiple z such that z = t cosh

Also cosh has this symmetry :
    (x + y i) cosh = (x+ y i) negated cosh
So we have to choose one of the possible solutions, and necessarily
create a branch cut whatever our choice...
Putting this in a method comment is challenging though.

A Help book with integrated plots would better fit, but we can as well
just provide links to Mathematica ;)

Nicolas

2011/4/23 Frank Shearar <frank.shearar at angband.za.org>:
> On 2011/04/23 00:40, commits at source.squeak.org wrote:
>>
>> Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
>> http://source.squeak.org/trunk/Kernel-nice.571.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Kernel-nice.571
>> Author: nice
>> Time: 23 April 2011, 2:39:41.455 am
>> UUID: 2bd91b82-067a-49c9-a7a7-61771de27b3b
>> Ancestors: Kernel-nice.570
>>
>> Connect the new DomainError
>> Correct (-1 copySignTo: 0.0) to return a negativeZero.
>> Add hyperbolic and inverse hyperbolic functions
>> Add plenty of Complex missing methods and few mathematical functions:
>>        i (multiply by 1 i)
>>        raisedTo:
>>        conjugated
>>        sqrt
>>        squaredNorm
>>        arcSin arcCos arcTan arcTan:
>>        sinh cosh tanh arSinh arCosh arTanh
>> Speed up a few complex functions by using #real:imaginary: directly rather
>> than intermediate arithmetic operations.
>>
>> =============== Diff against Kernel-nice.570 ===============
>>
>
> My complex maths is way too rusty to comment usefully on ar*, except this:
> Nicolas, you're implementing the principal value form of these functions,
> right? (So we're using the branch cut along (-\inf, 1).)
>
> Do you think it's worth pointing out in a comment, just in case someone
> forgets that these functions are, properly, multivalued?
>
> (How often do people use non-standard branch cuts, I wonder?)
>
> frank
>
>



More information about the Squeak-dev mailing list