Re: confused by a simple question

From: H.Dang <danghy_at_nyahnyahspammersnyahnyah>
Date: Fri Mar 29 2013 - 11:28:13 MDT

Thanks Dennis!

On Fri, Mar 29, 2013 at 1:23 PM, Dennis Shea <shea@ucar.edu> wrote:

> NCL default integer size is a signed 32 bit number
> The largest range is +/- 2147483647
>
> Your "d" is larger than the default can handle.
>
>
> b=1.098
> c=1.3e11
> d=130000000000
> print(b*c)
> print(b*d)
> D=130000000000l ; long (64 bit signed integer)
> print(b*D)
>
>
>
>
> On 03/29/2013 11:16 AM, H.Dang wrote:
>
>> Dear NCL'ers:
>>
>> I'm trying some simple multiplications and got confused:
>>
>> ncl 25> b=1.098
>> ncl 26> c=1.3e11
>> ncl 27> d=130000000000
>> ncl 28> print(b*c)
>> (0)1.4274e+11
>> ncl 29> print(b*d)
>> (0)1.263777e+09
>>
>> What I expect is that the command 28 and 29 have the same result since
>> "c" equals "d". I don't figure out at the moment why they are
>> different. I wonder what the mistake is in my expressions?
>>
>> Thank you!
>>
>> Hongyan
>>
>>
>> ______________________________**_________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/**mailman/listinfo/ncl-talk<http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
>>
>>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Mar 29 11:29:07 2013

This archive was generated by hypermail 2.1.8 : Tue Apr 02 2013 - 21:23:48 MDT