Skip to content

Commit

Permalink
spec jittability of div_i
Browse files Browse the repository at this point in the history
  • Loading branch information
TimToady committed Aug 27, 2014
1 parent 6989f5a commit ed80b33
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions S03-operators.pod
Expand Up @@ -14,8 +14,8 @@ Synopsis 3: Operators

Created: 8 Mar 2004

Last Modified: 18 Aug 2014
Version: 279
Last Modified: 27 Aug 2014
Version: 280

=head1 Overview

Expand Down Expand Up @@ -792,6 +792,11 @@ general, other operators that might fail should also consider their
use in hyperops and junctions, and whether they can profitably benefit
from a lazy exception model.)

On the other hand, C<div> wants to be very efficient and jittable when used
as a low-level operation, so when you use C<div> on two native ints, it relies on
hardware to detect division by 0. Hence, it will always throw an exception
rather than return a C<Failure>.

In general, C<div> should give the same result as

$x div $y == floor($x/$y)
Expand Down

0 comments on commit ed80b33

Please sign in to comment.