Related Articles

Related Articles

Getting lowest and highest value of a Data type in Julia – typemin() and typemax() Methods
  • Last Updated : 26 Mar, 2020

The typemin() is an inbuilt function in julia which is used to return the lowest value representable by the specified numeric DataType.

Syntax: typemin(T)

Parameters:

  • T: Specified numeric DataType.

Returns: It returns the lowest value representable by the specified numeric DataType.

Example 1:



filter_none

edit
close

play_arrow

link
brightness_4
code

# Julia program to illustrate 
# the use of typemin() method
  
# Getting the lowest value representable 
# by the specified numeric DataType.
println(typemin(Float16))
println(typemin(Float32))
println(typemin(Float64))
println(typemin(Int32))
println(typemin(Int64))

chevron_right


Output:

typemax()

The typemax() is an inbuilt function in julia which is used to return the highest value representable by the specified numeric DataType.

Syntax: typemax(T)

Parameters:

  • T: Specified numeric DataType.

Returns: It returns the value highest representable by the specified numeric DataType.

Example 1:

filter_none

edit
close

play_arrow

link
brightness_4
code

# Julia program to illustrate 
# the use of typemax() method
  
# Getting the highest value representable 
# by the specified numeric DataType.
println(typemax(Float16))
println(typemax(Float32))
println(typemax(Float64))
println(typemax(Int32))
println(typemax(UInt32))
println(typemax(Int64))

chevron_right


Output:

My Personal Notes arrow_drop_up
Recommended Articles
Page :