Logo

Programming-Idioms

History of Idiom 146 > diff from v20 to v21

Edit summary for version 21 by 1.7.4:
New JS implementation by user [1.7.4]

Version 20

2018-08-24, 13:03:03

Version 21

2019-01-24, 11:50:33

Idiom #146 Convert string to floating point number

Extract floating point value f from its string representation s

Idiom #146 Convert string to floating point number

Extract floating point value f from its string representation s

Extra Keywords
real conversion
Extra Keywords
real conversion
Code
let f = +s
Comments bubble
The unary _+ operator converts its argument to a double precision floating point.