VOOZH about

URL: https://www.geeksforgeeks.org/ruby/ruby-float-class-value-13/

⇱ Ruby | Float class == value - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Ruby | Float class == value

Last Updated : 8 Jan, 2020
Float#==() : ==() is a Float class method in Ruby which checks the equality of two Float values.
Syntax:  Float.==()

Parameter: Float values

Return:  true - if a == b; otherwise false
Code #1 : Example for ==() method Output :
Float a == b : false

Float b == c : false

Float a == c : false
Code #2 : Example for ==() method Output :
Float a == b : false

Float b == c : false

Float a == c : false
Comment