(FPCore (x y z t) :precision binary64 (* (- (* x y) (* z y)) t))
↓
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x y) (* y z))))
(if (<= t_1 -5e+255)
(* y (* t (- x z)))
(if (<= t_1 2e+267) (* t_1 t) (* (- x z) (* y t))))))
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x * y) - (z * y)) * t
end function
↓
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x * y) - (y * z)
if (t_1 <= (-5d+255)) then
tmp = y * (t * (x - z))
else if (t_1 <= 2d+267) then
tmp = t_1 * t
else
tmp = (x - z) * (y * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
return ((x * y) - (z * y)) * t;
}
herbie shell --seed 2022291
(FPCore (x y z t)
:name "Linear.Projection:inverseInfinitePerspective from linear-1.19.1.3"
:precision binary64
:herbie-target
(if (< t -9.231879582886777e-80) (* (* y t) (- x z)) (if (< t 2.543067051564877e+83) (* y (* t (- x z))) (* (* y (- x z)) t)))
(* (- (* x y) (* z y)) t))