Class: CAS::INFINITY_CONSTANT

Inherits:
Constant show all
Defined in:
lib/numbers/constants.rb

Overview

Class that represents the constant Infinity (∞)

Instance Attribute Summary

Attributes inherited from Op

#x

Instance Method Summary collapse

Methods inherited from Constant

#==, #args, #call, #depend?, #diff, #inspect, #simplify, #subs, #to_dot

Methods inherited from Op

#!=, #*, #**, #+, #-, #-@, #/, #==, #args, #as_proc, #call, #depend?, #diff, #dot_graph, #equal, #greater, #greater_equal, init_simplify_dict, #inspect, #limit, numeric_to_const, #simplify, simplify_dict, #simplify_dictionary, #smaller, #smaller_equal, #subs, #to_c_lib, #to_code

Constructor Details

#initializeINFINITY_CONSTANT

Initializer for the infinity constant

* **returns**: `CAS::INFINITY_CONSTANT` new instance


282
283
284
# File 'lib/numbers/constants.rb', line 282

def initialize
  @x = (1.0/0.0)
end

Instance Method Details

#to_sObject

String representation for the constant

* **returns**: `String`


289
290
291
# File 'lib/numbers/constants.rb', line 289

def to_s
  ""
end