Home »
Julia
floatmin() and floatmax() functions in Julia
Julia | floatmin() and floatmax() functions: In this tutorial, we are going to learn about the floatmin() and floatmax() functions with examples in Julia programming language.
Submitted by IncludeHelp, on March 28, 2020
Julia | floatmin() and floatmax() functions
floatmin() and floatmax() are the library functions of the Julia programming language and are used to get the smallest absolute and highest finite value of the given floating-point data type.
Syntax:
floatmin(T)
floatmax(T)
Here, T is the floating-point data type.
Example:
# Julia example of
# floatmin() and floatmax() functions
println("floatmin(Float16): ", floatmin(Float16))
println("floatmin(Float32): ", floatmin(Float32))
println("floatmin(Float64): ", floatmin(Float64))
println("floatmax(Float16): ", floatmax(Float16))
println("floatmax(Float32): ", floatmax(Float32))
println("floatmax(Float64): ", floatmax(Float64))
Output
floatmin(Float16): 6.104e-5
floatmin(Float32): 1.1754944e-38
floatmin(Float64): 2.2250738585072014e-308
floatmax(Float16): 6.55e4
floatmax(Float32): 3.4028235e38
floatmax(Float64): 1.7976931348623157e308
Reference: Julia Essentials