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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = ((x - z) * y) * t
t_2 = (x * y) - (z * y)
t_3 = (t * y) * (x - z)
if (t_2 <= (-2d+207)) then
tmp = t_3
else if (t_2 <= (-2d-180)) then
tmp = t_1
else if (t_2 <= 0.0d0) then
tmp = t_3
else if (t_2 <= 5d+174) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
return ((x * y) - (z * y)) * t;
}
if (-.f64 (*.f64 x y) (*.f64 z y)) < -2.0000000000000001e207 or -2e-180 < (-.f64 (*.f64 x y) (*.f64 z y)) < -0.0 or 4.9999999999999997e174 < (-.f64 (*.f64 x y) (*.f64 z y))
herbie shell --seed 2023010
(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))