issue with inf from exp function

Steven Schveighoffer schveiguy at yahoo.com
Wed Mar 7 16:40:04 UTC 2018


On 3/7/18 11:19 AM, Matt Gamble wrote:
> On Wednesday, 7 March 2018 at 16:12:28 UTC, Matt Gamble wrote:
>> On Wednesday, 7 March 2018 at 16:10:15 UTC, Marc wrote:
>>> On Wednesday, 7 March 2018 at 16:00:39 UTC, Alex wrote:
>>>> On Wednesday, 7 March 2018 at 15:44:28 UTC, Matt Gamble wrote:
>>>>> [...]
>>>>
>>>> works for me as expected.
>>>>
>>>> ln(largest double) = 709.783
>>>> e^710 = inf
>>>> ln(largest real) = 11356.5
>>>> e^710 = 2.23399e+308
>>>
>>> it works for me too.
>>>
>>> https://imgur.com/bLGTv1l
>>
>> Wow, Now I'm really confused, I'm using DMD v2.076.1. Any thoughts I 
>> why I'm getting this result?
> 
> Yes if I switch to 32bit, it works for me now. Is this a bug?

Looks like it. The core.stdc.math module looks very cryptic, but appears 
to do some weird things via exp on real.

-Steve


More information about the Digitalmars-d-learn mailing list