Class: CAS::NEG_INFINITY_CONSTANT
- Defined in:
- lib/numbers/constants.rb
Overview
Class that represents the constant Negative Infinity (-∞)
Instance Attribute Summary
Attributes inherited from Op
Instance Method Summary collapse
-
#initialize ⇒ NEG_INFINITY_CONSTANT
constructor
Initializer for the negative infinity constant.
-
#to_s ⇒ Object
String representation for the constant.
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
#initialize ⇒ NEG_INFINITY_CONSTANT
Initializer for the negative infinity constant
* **returns**: `CAS::NEG_INFINITY_CONSTANT` new instance
309 310 311 |
# File 'lib/numbers/constants.rb', line 309 def initialize @x = -(1.0/0.0) end |
Instance Method Details
#to_s ⇒ Object
String representation for the constant
* **returns**: `String`
316 317 318 |
# File 'lib/numbers/constants.rb', line 316 def to_s "-∞" end |