Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 555 Bytes

to-float.md

File metadata and controls

21 lines (14 loc) · 555 Bytes

to-float

to-float converts the given value to a floating point number. The function always uses humane coalescing.

Examples

  • (to-float 0)0.0
  • (to-float "0")0.0
  • (to-float 1)1.0
  • (to-float []) ➜ error

Forms

(to-float value:any)float

  • value is an arbitrary expression.

to-float evaluates the given expression and then coalesces the result into a floating point value. See the documentation for the humane coalescer for the exact conversion rules.