I now see the description of hex float notation in section 4.2 (Floating
Point Numbers) of the manual (0.4.0-dev), which includes using "p" as
binary exponent notation. I think that the error message could be improved,
at a minimum. But there are problems with the current syntax that will
cause others to get caught too, I fear, such as:
* julia> 3e+1*
* 30.0*
*julia> 3e + 1*
* 9.154845485377136*
That is, the spaces around the "+" are significant here, as to whether "e"
is treated as the math constant or the floating point exponent notation...
I fear that "numeric literal coefficients" may introduce more hazards than
its economy of notation justifies... ??
Cheers,
Ron
On Sunday, January 4, 2015 9:44:38 PM UTC-10, Ronald L. Rivest wrote:
>
> I'm using Julia 0.3.4 command line.
> Entering
> p = 1; 2p+1
> gives an error:
>
> *julia> p = 1; 2p+1*
>
> * ERROR: syntax: malformed expression*
>
> whereas using a different variable name doesn't give an error
>
> *julia> x = 1; 2x+1*
>
> * 3*
>
> There must be some aspect of Julia syntax I have missed??
>
> Thanks for any light you can shed on this...
>
> Cheers,
>
> Ron Rivest
>