--- !ruby/object:RDoc::RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: Controls handling of arithmetic exceptions and rounding. If no value is supplied, the current value is returned.
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: "Six values of the mode parameter control the handling of arithmetic exceptions:"
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: BigDecimal::EXCEPTION_NaN BigDecimal::EXCEPTION_INFINITY BigDecimal::EXCEPTION_UNDERFLOW BigDecimal::EXCEPTION_OVERFLOW BigDecimal::EXCEPTION_ZERODIVIDE BigDecimal::EXCEPTION_ALL
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: "For each mode parameter above, if the value set is false, computation continues after an arithmetic exception of the appropriate type. When computation continues, results are as follows:"
- !ruby/object:RDoc::Markup::Flow::LIST 
  contents: 
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "EXCEPTION_NaN:"
    :body: NaN
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "EXCEPTION_INFINITY:"
    :body: +infinity or -infinity
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "EXCEPTION_UNDERFLOW:"
    :body: "0"
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "EXCEPTION_OVERFLOW:"
    :body: +infinity or -infinity
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "EXCEPTION_ZERODIVIDE:"
    :body: +infinity or -infinity
  type: :NOTE
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: "One value of the mode parameter controls the rounding of numeric values: BigDecimal::ROUND_MODE. The values it can take are:"
- !ruby/object:RDoc::Markup::Flow::LIST 
  contents: 
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "ROUND_UP:"
    :body: round away from zero
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "ROUND_DOWN:"
    :body: round towards zero (truncate)
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "ROUND_HALF_UP:"
    :body: round up if the appropriate digit &gt;= 5, otherwise truncate (default)
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "ROUND_HALF_DOWN:"
    :body: round up if the appropriate digit &gt;= 6, otherwise truncate
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "ROUND_HALF_EVEN:"
    :body: round towards the even neighbor (Banker's rounding)
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "ROUND_CEILING:"
    :body: round towards positive infinity (ceil)
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "ROUND_FLOOR:"
    :body: round towards negative infinity (floor)
  type: :NOTE
full_name: BigDecimal::mode
is_singleton: true
name: mode
params: |
  BigDecimal.mode(mode, value)

visibility: public
