Csound Csound-dev Csound-tekno Search About

Re: [Csnd-dev] floating point text: 'e' vs. 'E'

Date2016-09-27 15:17
FromNate Whetsell
SubjectRe: [Csnd-dev] floating point text: 'e' vs. 'E'
`E` and `e` can be used interchangeably for exponents of floating-point literals in Java . A suffix of `F` or `f` indicates a single-precision (32-bit) literal. A suffix of `D` or `d` (or no suffix) indicates a double-precision (64-bit) literal.

This is also the case in C (and C++, and Objective-C) — `E` and `e` can be used interchangeably — but there isn’t a special suffix for double-precision numbers (floating-point literals with no suffix are double-precision). JavaScript , PHP , and Python 

Date2016-09-27 16:59
FromSteven Yi
SubjectRe: [Csnd-dev] floating point text: 'e' vs. 'E'
Thanks John and Nate for that.  I'll probably audit Blue to ensure
printing of doubles doesn't use exponential notation, but I think it
would be good to have support for 'E' as I can imagine this popping up
for other users.

Thanks John too for looking into this!

steven


On Tue, Sep 27, 2016 at 10:17 AM, Nate Whetsell
 wrote:
> `E` and `e` can be used interchangeably for exponents of floating-point literals in Java . A suffix of `F` or `f` indicates a single-precision (32-bit) literal. A suffix of `D` or `d` (or no suffix) indicates a double-precision (64-bit) literal.
>
> This is also the case in C (and C++, and Objective-C) — `E` and `e` can be used interchangeably — but there isn’t a special suffix for double-precision numbers (floating-point literals with no suffix are double-precision). JavaScript , PHP , and Python