text-1.1.1.3: An efficient packed Unicode text type.

Safe HaskellTrustworthy

Data.Text.Lazy.Builder.RealFloat

Description

Write a floating point value to a Builder.

Synopsis

Documentation

data FPFormat Source

Control the rendering of floating point numbers.

Constructors

Exponent

Scientific notation (e.g. 2.3e123).

Fixed

Standard decimal notation.

Generic

Use decimal notation for values between 0.1 and 9,999,999, and scientific notation otherwise.

realFloat :: RealFloat a => a -> BuilderSource

Show a signed RealFloat value to full precision, using standard decimal notation for arguments whose absolute value lies between 0.1 and 9,999,999, and scientific notation otherwise.

formatRealFloatSource

Arguments

:: RealFloat a 
=> FPFormat 
-> Maybe Int

Number of decimal places to render.

-> a 
-> Builder