package console

Build not yet checked
  1. Overview
  2. Docs
Colours, tables, trees and progress rows for the terminal

Install

dune-project
 Dependency

Authors

Maintainers

Sources

console-0.10.1.tbz
sha256=37ad65f6833c65814b0673f009f6b656c5194608ca03519da2e63e1051d54f6e
sha512=7677067f1a3244779cdbc5c90a8b0e1eba30c3fd58281584ea3d4c46c3e219eef0668588ca0e2938799c61a3fa831ce2146eac73717214d7baf96b497bfcd892

doc/console/Console/Decimal/index.html

Module Console.DecimalSource

Numbers with a fixed count of decimals, the same on every platform.

Numbers with a fixed count of decimals, the same on every platform.

Printf's %.1f leaves the rounding to the C library, which differs: glibc rounds 4.25 to "4.2" and MinGW's to "4.3". These functions round themselves, so a program prints the same digits everywhere.

Sourceval string_of_float : digits:int -> float -> string

string_of_float ~digits x is x rounded to digits decimals, a tie away from zero, such as "4.3" for string_of_float ~digits:1 4.25 and "12" for string_of_float ~digits:0 11.5. A value that rounds to zero has no sign. NaN is "nan" and the infinities are "inf" and "-inf". Beyond 2{^62} units of the last decimal, the digits are Printf's.

Sourceval pp : digits:int -> float Fmt.t

pp ~digits formats as string_of_float ~digits.