A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://hackage.haskell.org/package/base/docs/Numeric.html below:

Numeric

Showing

showSigned Source #

Arguments

:: Real a   => (a -> ShowS)

a function that can show unsigned values

-> Int

the precedence of the enclosing context

-> a

the value to show

-> ShowS  

Converts a possibly-negative Real value to a string.

showGFloat :: RealFloat a => Maybe Int -> a -> ShowS Source #

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

In the call showGFloat digs val, if digs is Nothing, the value is shown to full precision; if digs is Just d, then at most d digits after the decimal point are shown.

showGFloatAlt :: RealFloat a => Maybe Int -> a -> ShowS Source #

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

This behaves as showFFloat, except that a decimal point is always guaranteed, even if not needed.

Since: base-4.7.0.0

showFloat :: RealFloat a => a -> ShowS Source #

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.

showHFloat :: RealFloat a => a -> ShowS Source #

Show a floating-point value in the hexadecimal format, similar to the %a specifier in C's printf.

>>> showHFloat (212.21 :: Double) ""
"0x1.a86b851eb851fp7"
>>> showHFloat (-12.76 :: Float) ""
"-0x1.9851ecp3"
>>> showHFloat (-0 :: Double) ""
"-0x0p+0"

Since: base-4.11.0.0

Reading

NB: readInt is the 'dual' of showIntAtBase, and readDec is the `dual' of showInt. The inconsistent naming is a historical accident.

readInt Source #

Arguments

:: Num a   => a

the base

-> (Char -> Bool)

a predicate distinguishing valid digits in this base

-> (Char -> Int)

a function converting a valid digit character to an Int

-> ReadS a  

Reads an unsigned integral value in an arbitrary base.

readHex :: (Eq a, Num a) => ReadS a Source #

Read an unsigned number in hexadecimal notation. Both upper or lower case letters are allowed.

>>> readHex "deadbeef"
[(3735928559,"")]

readFloat :: RealFrac a => ReadS a Source #

Reads an unsigned RealFrac value, expressed in decimal scientific notation.

Note that this function takes time linear in the magnitude of its input which can scale exponentially with input size (e.g. "1e100000000" is a very large number while having a very small textual form). For this reason, users should take care to avoid using this function on untrusted input. Users needing to parse floating point values (e.g. Float) are encouraged to instead use read, which does not suffer from this issue.

Miscellaneous

class Fractional a => Floating a where Source #

Trigonometric and hyperbolic functions and related functions.

The Haskell Report defines no laws for Floating. However, (+), (*) and exp are customarily expected to define an exponential field and have the following properties:

Minimal complete definition

pi, exp, log, sin, cos, asin, acos, atan, sinh, cosh, asinh, acosh, atanh

Instances Instances details

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4