scientific-0.3.4.2: Numbers represented using scientific notation

Safe Haskell | None
Language | Haskell2010

Data.Text.Lazy.Builder.Scientific

Synopsis

- scientificBuilder :: Scientific -> Builder
- formatScientificBuilder :: FPFormat -> Maybe Int -> Scientific -> Builder
- data FPFormat :: *
  - = Exponent
  - | Fixed
  - | Generic

# Documentation

scientificBuilder :: Scientific -> Builder

A `Text` `Builder` which renders a scientific number to full precision, using standard decimal notation for arguments whose absolute value lies between `0.1` and `9,999,999`, and scientific notation otherwise.

formatScientificBuilder

Arguments

:: FPFormat |
-> Maybe Int | Number of decimal places to render.
-> Scientific |
-> Builder |

Like `scientificBuilder` but provides rendering options.

data FPFormat :: *

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.

Instances

Enum FPFormat |
Read FPFormat |
Show FPFormat |