[Cfp-interest 3081] Re: casinh(x + iNaN) - Annex G.6.3.2
Damian McGuckin
damianm at esi.com.au
Sat Apr 6 22:10:55 PDT 2024
On Fri, 5 Apr 2024, Damian McGuckin wrote:
> On Thu, 4 Apr 2024, Jim Thomas wrote:
>
>> casinh(iy) = i asin(y)
>>
>>>
>>> is only valid for |y| <= 1. After that, the G.7 formula will return a NaN
>>> because no asin() function will ever accept a value outside that range.
>>> On the other hand, a complex function can expand into complex space.
>>
>> The formula is defining a function on imaginary numbers, not complex ones.
Yes. But nowhere does it say that a function or macro which takes an
imaginary argumnt must return an imaginary result. In fact, at the end of
clause 1, G.7 refers to other macros which return complex results. It does
not define them. I assume they are acos, acosh, log and sqrt,
The only functions in that table which cause a problem are
asinh(iy)
and
atan(iy)
If you define either in terms of a real function, there are problems when
|y} > 1
because those real functions return NaN for that case. I think I have
captured all the problem cases.
If they got moved into the last batch of undefined macros which can return
a complex number, then for any of those macros in that table (or the
missing ones) say 'name', then
name(iy) = cname(0 + iy)
There are no outliers and all the previous special cases still hold.
What do you think - Damian
More information about the Cfp-interest
mailing list