Related Articles

Related Articles

Getting the minimum value from a list in Julia – min() Method
  • Last Updated : 21 Apr, 2020

The min() is an inbuilt function in julia which is used to return the minimum value of the parameters.

Syntax: min(x, y, …)

Parameters:

  • x: Specified 1st value.
  • y: Specified 2nd value and so on.

Returns: It returns the minimum value of the parameters.

Example 1:



filter_none

edit
close

play_arrow

link
brightness_4
code

# Julia program to illustrate 
# the use of min() method
  
# Getting the minimum value of the parameters.
println(min(1, 2, 3, 4))
println(min(1, 3, 5))
println(min(2, 4, 6))

chevron_right


Output:

1
1
2

Example 2:

filter_none

edit
close

play_arrow

link
brightness_4
code

# Julia program to illustrate 
# the use of min() method
  
# Getting the minimum value of the parameters.
println(min(0.6, 0.7, 0.2))
println(min(2.5, 3.5, 0.3, 1.7))

chevron_right


Output:

0.2
0.3
My Personal Notes arrow_drop_up
Recommended Articles
Page :