[Tutor] Order Of Operations Question

David Hutto smokefloat at gmail.com
Thu Jul 29 02:13:38 CEST 2010


On Wed, Jul 28, 2010 at 8:03 PM, Dave Angel <davea at ieee.org> wrote:
>
>
> David Hutto wrote:
>>
>> <snip>
>> I'll probably ending up reading something about it later in the book,
>> but as a quick question, why does:
>>
>>
>>>>>
>>>>> 5e18 =5**18
>>>>>
>>
>> False
>>
>>>>>
>>>>> int(5e18) =int(5**18)
>>>>>
>>
>> False
>>
>>>>>
>>>>> 1.01325e5 =1.01325**5
>>>>>
>>
>> False
>>
>>
>
> The  999e44  notation is intended to be similar to scientific notation,
> where 44 is the exponent, in base 10.
>
> So redoing your equalities:
>
> 5e18 == 5*(10**18)
> int(5e18) == int(5 * 10**18)
> 1.01325e5 == 1.01325 * 10**5
>
> The extra parens in the first case, and the extra spaces in the others, are
> just for readability.  It'd be just as correct to say:
> 1.01325e5 == 1.01325*10**5
>
> DaveA
>
>
>

Already done!

And 5.3*10**18 or 5.2613095377e+18 is the appropriate answer from a
quick google search that resulted in the rounded 5.3e18. So the book
apparently left out the 5.3*, and just gave 10**18.

Thanks for your help, I think this is solved.


More information about the Tutor mailing list