~ubuntu-branches/ubuntu/saucy/kcalc/saucy-proposed

« back to all changes in this revision

Viewing changes to kcalc_core.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-01-18 15:01:14 UTC
  • mfrom: (1.1.17)
  • Revision ID: package-import@ubuntu.com-20130118150114-eknl5kn1w4b5amdg
Tags: 4:4.9.98-0ubuntu1
New upstream release candidate

Show diffs side-by-side

added added

removed removed

Lines of Context:
493
493
    if (input.type() == KNumber::TYPE_ERROR) {
494
494
        if (input == KNumber::NaN)         last_number_ = KNumber::NaN;
495
495
        if (input == KNumber::PosInfinity) last_number_ = KNumber::PosInfinity;
496
 
        if (input == KNumber::NegInfinity) last_number_ = KNumber::NegInfinity;
 
496
                // YES, this should be *positive* infinity. We mimic the behavior of 
 
497
                // libc which says the following for cosh
 
498
                //
 
499
                // "If x is positive infinity or negative infinity, positive infinity is returned."
 
500
        if (input == KNumber::NegInfinity) last_number_ = KNumber::PosInfinity;
497
501
        return;
498
502
    }
499
503