Skip to content

Commit

Permalink
Fix relational operator tests to work properly with NaN values.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed May 10, 2011
1 parent 705435e commit c929021
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/Num.pm
Expand Up @@ -197,7 +197,7 @@ multi sub infix:«==»(Num $a, Num $b) {
}

multi sub infix!=»(Num $a, Num $b) {
pir::iseq__INN( $a, $b) ?? False !! True # note reversed
pir::isne__INN( $a, $b) ?? True !! False
}

multi sub infix<»(Num $a, Num $b) {
Expand All @@ -209,11 +209,11 @@ multi sub infix:«>»(Num $a, Num $b) {
}

multi sub infix<=»(Num $a, Num $b) {
pir::isgt__INN( $a, $b) ?? False !! True # note reversed
pir::isle__INN( $a, $b) ?? True !! False
}

multi sub infix>=»(Num $a, Num $b) {
pir::islt__INN( $a, $b) ?? False !! True # note reversed
pir::isge__INN( $a, $b) ?? True !! False
}

# Arithmetic operators
Expand Down

0 comments on commit c929021

Please sign in to comment.