\[\begin{array}{l}
t_1 := x \cdot y - z \cdot t\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+290} \lor \neg \left(t_1 \leq 4 \cdot 10^{+300}\right):\\
\;\;\;\;\frac{x}{\frac{a}{y}} - \frac{z}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{a}\\
\end{array}
\]
(FPCore (x y z t a) :precision binary64 (/ (- (* x y) (* z t)) a))
↓
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* x y) (* z t))))
(if (or (<= t_1 -5e+290) (not (<= t_1 4e+300)))
(- (/ x (/ a y)) (/ z (/ a t)))
(/ t_1 a))))
double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
↓
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if ((t_1 <= -5e+290) || !(t_1 <= 4e+300)) {
tmp = (x / (a / y)) - (z / (a / t));
} else {
tmp = t_1 / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((x * y) - (z * t)) / a
end function
↓
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (x * y) - (z * t)
if ((t_1 <= (-5d+290)) .or. (.not. (t_1 <= 4d+300))) then
tmp = (x / (a / y)) - (z / (a / t))
else
tmp = t_1 / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
↓
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - (z * t);
double tmp;
if ((t_1 <= -5e+290) || !(t_1 <= 4e+300)) {
tmp = (x / (a / y)) - (z / (a / t));
} else {
tmp = t_1 / a;
}
return tmp;
}
def code(x, y, z, t, a):
return ((x * y) - (z * t)) / a
↓
def code(x, y, z, t, a):
t_1 = (x * y) - (z * t)
tmp = 0
if (t_1 <= -5e+290) or not (t_1 <= 4e+300):
tmp = (x / (a / y)) - (z / (a / t))
else:
tmp = t_1 / a
return tmp
function code(x, y, z, t, a)
return Float64(Float64(Float64(x * y) - Float64(z * t)) / a)
end
↓
function code(x, y, z, t, a)
t_1 = Float64(Float64(x * y) - Float64(z * t))
tmp = 0.0
if ((t_1 <= -5e+290) || !(t_1 <= 4e+300))
tmp = Float64(Float64(x / Float64(a / y)) - Float64(z / Float64(a / t)));
else
tmp = Float64(t_1 / a);
end
return tmp
end
function tmp = code(x, y, z, t, a)
tmp = ((x * y) - (z * t)) / a;
end
↓
function tmp_2 = code(x, y, z, t, a)
t_1 = (x * y) - (z * t);
tmp = 0.0;
if ((t_1 <= -5e+290) || ~((t_1 <= 4e+300)))
tmp = (x / (a / y)) - (z / (a / t));
else
tmp = t_1 / a;
end
tmp_2 = tmp;
end
if -4.9999999999999998e290 < (-.f64 (*.f64 x y) (*.f64 z t)) < 4.0000000000000002e300
Initial program 0.8
\[\frac{x \cdot y - z \cdot t}{a}
\]
Recombined 2 regimes into one program.
Final simplification0.8
\[\leadsto \begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot t \leq -5 \cdot 10^{+290} \lor \neg \left(x \cdot y - z \cdot t \leq 4 \cdot 10^{+300}\right):\\
\;\;\;\;\frac{x}{\frac{a}{y}} - \frac{z}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\end{array}
\]
herbie shell --seed 2022343
(FPCore (x y z t a)
:name "Data.Colour.Matrix:inverse from colour-2.3.3, B"
:precision binary64
:herbie-target
(if (< z -2.468684968699548e+170) (- (* (/ y a) x) (* (/ t a) z)) (if (< z 6.309831121978371e-71) (/ (- (* x y) (* z t)) a) (- (* (/ y a) x) (* (/ t a) z))))
(/ (- (* x y) (* z t)) a))