VOOZH about

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

⇱ Ruby | Float class + value - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Ruby | Float class + value

Last Updated : 7 Jan, 2020
Float#+() : +() is a Float class method in Ruby which return sum of two Float numbers.
Syntax:  Float.+()

Parameter: Float values

Return:  Sum of the two Float values
Code #1 : Example for +() method Output :
Float a + b : -200111.1

Float b + c : -200116.4

Float a + c : -227.5
Code #2 : Example for +() method Output :
Float a + b : 9943.76666667

Float b + c : 9970.9

Float a + c : -85.33333333
Comment