
(FPCore (x y z t a) :precision binary64 (/ (- (* x y) (* z t)) a))
double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
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
public static double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
def code(x, y, z, t, a): return ((x * y) - (z * t)) / a
function code(x, y, z, t, a) return Float64(Float64(Float64(x * y) - Float64(z * t)) / a) end
function tmp = code(x, y, z, t, a) tmp = ((x * y) - (z * t)) / a; end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y - z \cdot t}{a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (/ (- (* x y) (* z t)) a))
double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
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
public static double code(double x, double y, double z, double t, double a) {
return ((x * y) - (z * t)) / a;
}
def code(x, y, z, t, a): return ((x * y) - (z * t)) / a
function code(x, y, z, t, a) return Float64(Float64(Float64(x * y) - Float64(z * t)) / a) end
function tmp = code(x, y, z, t, a) tmp = ((x * y) - (z * t)) / a; end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y - z \cdot t}{a}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= (/ (- (* x y) (* z t)) a) (- INFINITY)) (- (/ x (/ a y)) (* t (/ z a))) (/ (fma x y (* z (- t))) a)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((((x * y) - (z * t)) / a) <= -((double) INFINITY)) {
tmp = (x / (a / y)) - (t * (z / a));
} else {
tmp = fma(x, y, (z * -t)) / a;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (Float64(Float64(Float64(x * y) - Float64(z * t)) / a) <= Float64(-Inf)) tmp = Float64(Float64(x / Float64(a / y)) - Float64(t * Float64(z / a))); else tmp = Float64(fma(x, y, Float64(z * Float64(-t))) / a); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], (-Infinity)], N[(N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision] - N[(t * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * y + N[(z * (-t)), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x \cdot y - z \cdot t}{a} \leq -\infty:\\
\;\;\;\;\frac{x}{\frac{a}{y}} - t \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(-t\right)\right)}{a}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (*.f64 x y) (*.f64 z t)) a) < -inf.0Initial program 85.7%
div-sub83.8%
associate-/l*92.7%
associate-/l*98.0%
Applied egg-rr98.0%
associate-/r/98.1%
Applied egg-rr98.1%
if -inf.0 < (/.f64 (-.f64 (*.f64 x y) (*.f64 z t)) a) Initial program 95.9%
fma-neg96.4%
distribute-rgt-neg-out96.4%
Simplified96.4%
Final simplification96.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- z) (/ t a))) (t_2 (/ y (/ a x))) (t_3 (/ (- t) (/ a z))))
(if (<= (* x y) -2e-6)
t_2
(if (<= (* x y) -4e-39)
t_1
(if (<= (* x y) -1e-76)
(* x (/ y a))
(if (<= (* x y) -5e-289)
t_3
(if (<= (* x y) 2e-119)
t_1
(if (<= (* x y) 400000000000.0)
(/ (* x y) a)
(if (<= (* x y) 2e+42) t_3 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -z * (t / a);
double t_2 = y / (a / x);
double t_3 = -t / (a / z);
double tmp;
if ((x * y) <= -2e-6) {
tmp = t_2;
} else if ((x * y) <= -4e-39) {
tmp = t_1;
} else if ((x * y) <= -1e-76) {
tmp = x * (y / a);
} else if ((x * y) <= -5e-289) {
tmp = t_3;
} else if ((x * y) <= 2e-119) {
tmp = t_1;
} else if ((x * y) <= 400000000000.0) {
tmp = (x * y) / a;
} else if ((x * y) <= 2e+42) {
tmp = t_3;
} else {
tmp = t_2;
}
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
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = -z * (t / a)
t_2 = y / (a / x)
t_3 = -t / (a / z)
if ((x * y) <= (-2d-6)) then
tmp = t_2
else if ((x * y) <= (-4d-39)) then
tmp = t_1
else if ((x * y) <= (-1d-76)) then
tmp = x * (y / a)
else if ((x * y) <= (-5d-289)) then
tmp = t_3
else if ((x * y) <= 2d-119) then
tmp = t_1
else if ((x * y) <= 400000000000.0d0) then
tmp = (x * y) / a
else if ((x * y) <= 2d+42) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -z * (t / a);
double t_2 = y / (a / x);
double t_3 = -t / (a / z);
double tmp;
if ((x * y) <= -2e-6) {
tmp = t_2;
} else if ((x * y) <= -4e-39) {
tmp = t_1;
} else if ((x * y) <= -1e-76) {
tmp = x * (y / a);
} else if ((x * y) <= -5e-289) {
tmp = t_3;
} else if ((x * y) <= 2e-119) {
tmp = t_1;
} else if ((x * y) <= 400000000000.0) {
tmp = (x * y) / a;
} else if ((x * y) <= 2e+42) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -z * (t / a) t_2 = y / (a / x) t_3 = -t / (a / z) tmp = 0 if (x * y) <= -2e-6: tmp = t_2 elif (x * y) <= -4e-39: tmp = t_1 elif (x * y) <= -1e-76: tmp = x * (y / a) elif (x * y) <= -5e-289: tmp = t_3 elif (x * y) <= 2e-119: tmp = t_1 elif (x * y) <= 400000000000.0: tmp = (x * y) / a elif (x * y) <= 2e+42: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-z) * Float64(t / a)) t_2 = Float64(y / Float64(a / x)) t_3 = Float64(Float64(-t) / Float64(a / z)) tmp = 0.0 if (Float64(x * y) <= -2e-6) tmp = t_2; elseif (Float64(x * y) <= -4e-39) tmp = t_1; elseif (Float64(x * y) <= -1e-76) tmp = Float64(x * Float64(y / a)); elseif (Float64(x * y) <= -5e-289) tmp = t_3; elseif (Float64(x * y) <= 2e-119) tmp = t_1; elseif (Float64(x * y) <= 400000000000.0) tmp = Float64(Float64(x * y) / a); elseif (Float64(x * y) <= 2e+42) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -z * (t / a); t_2 = y / (a / x); t_3 = -t / (a / z); tmp = 0.0; if ((x * y) <= -2e-6) tmp = t_2; elseif ((x * y) <= -4e-39) tmp = t_1; elseif ((x * y) <= -1e-76) tmp = x * (y / a); elseif ((x * y) <= -5e-289) tmp = t_3; elseif ((x * y) <= 2e-119) tmp = t_1; elseif ((x * y) <= 400000000000.0) tmp = (x * y) / a; elseif ((x * y) <= 2e+42) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-z) * N[(t / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[((-t) / N[(a / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2e-6], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -4e-39], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -1e-76], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -5e-289], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], 2e-119], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 400000000000.0], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e+42], t$95$3, t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-z\right) \cdot \frac{t}{a}\\
t_2 := \frac{y}{\frac{a}{x}}\\
t_3 := \frac{-t}{\frac{a}{z}}\\
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{-6}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-76}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-289}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-119}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 400000000000:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{+42}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 x y) < -1.99999999999999991e-6 or 2.00000000000000009e42 < (*.f64 x y) Initial program 89.7%
Taylor expanded in x around inf 78.8%
associate-*l/78.5%
Simplified78.5%
*-commutative78.5%
clear-num77.4%
un-div-inv77.5%
Applied egg-rr77.5%
if -1.99999999999999991e-6 < (*.f64 x y) < -3.99999999999999972e-39 or -5.00000000000000029e-289 < (*.f64 x y) < 2.00000000000000003e-119Initial program 96.7%
Taylor expanded in x around 0 89.1%
mul-1-neg89.1%
associate-/l*86.2%
Simplified86.2%
associate-/r/77.7%
Applied egg-rr77.7%
if -3.99999999999999972e-39 < (*.f64 x y) < -9.99999999999999927e-77Initial program 99.2%
Taylor expanded in x around inf 84.9%
associate-*l/84.9%
Simplified84.9%
expm1-log1p-u59.9%
expm1-udef13.1%
*-commutative13.1%
clear-num13.1%
un-div-inv13.1%
Applied egg-rr13.1%
expm1-def59.9%
expm1-log1p84.5%
associate-/r/84.5%
Simplified84.5%
if -9.99999999999999927e-77 < (*.f64 x y) < -5.00000000000000029e-289 or 4e11 < (*.f64 x y) < 2.00000000000000009e42Initial program 99.5%
Taylor expanded in x around 0 84.8%
mul-1-neg84.8%
associate-/l*62.9%
Simplified62.9%
if 2.00000000000000003e-119 < (*.f64 x y) < 4e11Initial program 99.4%
Taylor expanded in x around inf 58.0%
Final simplification73.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- z) (/ t a))) (t_2 (/ y (/ a x))))
(if (<= (* x y) -2e-6)
t_2
(if (<= (* x y) -4e-39)
t_1
(if (<= (* x y) -1e-76)
(* x (/ y a))
(if (<= (* x y) -5e-289)
(* t (/ (- z) a))
(if (<= (* x y) 2e-119)
t_1
(if (<= (* x y) 400000000000.0)
(/ (* x y) a)
(if (<= (* x y) 2e+42) (/ (- t) (/ a z)) t_2)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -z * (t / a);
double t_2 = y / (a / x);
double tmp;
if ((x * y) <= -2e-6) {
tmp = t_2;
} else if ((x * y) <= -4e-39) {
tmp = t_1;
} else if ((x * y) <= -1e-76) {
tmp = x * (y / a);
} else if ((x * y) <= -5e-289) {
tmp = t * (-z / a);
} else if ((x * y) <= 2e-119) {
tmp = t_1;
} else if ((x * y) <= 400000000000.0) {
tmp = (x * y) / a;
} else if ((x * y) <= 2e+42) {
tmp = -t / (a / z);
} else {
tmp = t_2;
}
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
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = -z * (t / a)
t_2 = y / (a / x)
if ((x * y) <= (-2d-6)) then
tmp = t_2
else if ((x * y) <= (-4d-39)) then
tmp = t_1
else if ((x * y) <= (-1d-76)) then
tmp = x * (y / a)
else if ((x * y) <= (-5d-289)) then
tmp = t * (-z / a)
else if ((x * y) <= 2d-119) then
tmp = t_1
else if ((x * y) <= 400000000000.0d0) then
tmp = (x * y) / a
else if ((x * y) <= 2d+42) then
tmp = -t / (a / z)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -z * (t / a);
double t_2 = y / (a / x);
double tmp;
if ((x * y) <= -2e-6) {
tmp = t_2;
} else if ((x * y) <= -4e-39) {
tmp = t_1;
} else if ((x * y) <= -1e-76) {
tmp = x * (y / a);
} else if ((x * y) <= -5e-289) {
tmp = t * (-z / a);
} else if ((x * y) <= 2e-119) {
tmp = t_1;
} else if ((x * y) <= 400000000000.0) {
tmp = (x * y) / a;
} else if ((x * y) <= 2e+42) {
tmp = -t / (a / z);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -z * (t / a) t_2 = y / (a / x) tmp = 0 if (x * y) <= -2e-6: tmp = t_2 elif (x * y) <= -4e-39: tmp = t_1 elif (x * y) <= -1e-76: tmp = x * (y / a) elif (x * y) <= -5e-289: tmp = t * (-z / a) elif (x * y) <= 2e-119: tmp = t_1 elif (x * y) <= 400000000000.0: tmp = (x * y) / a elif (x * y) <= 2e+42: tmp = -t / (a / z) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-z) * Float64(t / a)) t_2 = Float64(y / Float64(a / x)) tmp = 0.0 if (Float64(x * y) <= -2e-6) tmp = t_2; elseif (Float64(x * y) <= -4e-39) tmp = t_1; elseif (Float64(x * y) <= -1e-76) tmp = Float64(x * Float64(y / a)); elseif (Float64(x * y) <= -5e-289) tmp = Float64(t * Float64(Float64(-z) / a)); elseif (Float64(x * y) <= 2e-119) tmp = t_1; elseif (Float64(x * y) <= 400000000000.0) tmp = Float64(Float64(x * y) / a); elseif (Float64(x * y) <= 2e+42) tmp = Float64(Float64(-t) / Float64(a / z)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -z * (t / a); t_2 = y / (a / x); tmp = 0.0; if ((x * y) <= -2e-6) tmp = t_2; elseif ((x * y) <= -4e-39) tmp = t_1; elseif ((x * y) <= -1e-76) tmp = x * (y / a); elseif ((x * y) <= -5e-289) tmp = t * (-z / a); elseif ((x * y) <= 2e-119) tmp = t_1; elseif ((x * y) <= 400000000000.0) tmp = (x * y) / a; elseif ((x * y) <= 2e+42) tmp = -t / (a / z); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-z) * N[(t / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2e-6], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -4e-39], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -1e-76], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -5e-289], N[(t * N[((-z) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e-119], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 400000000000.0], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e+42], N[((-t) / N[(a / z), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-z\right) \cdot \frac{t}{a}\\
t_2 := \frac{y}{\frac{a}{x}}\\
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{-6}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq -4 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-76}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-289}:\\
\;\;\;\;t \cdot \frac{-z}{a}\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-119}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 400000000000:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{+42}:\\
\;\;\;\;\frac{-t}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 x y) < -1.99999999999999991e-6 or 2.00000000000000009e42 < (*.f64 x y) Initial program 89.7%
Taylor expanded in x around inf 78.8%
associate-*l/78.5%
Simplified78.5%
*-commutative78.5%
clear-num77.4%
un-div-inv77.5%
Applied egg-rr77.5%
if -1.99999999999999991e-6 < (*.f64 x y) < -3.99999999999999972e-39 or -5.00000000000000029e-289 < (*.f64 x y) < 2.00000000000000003e-119Initial program 96.7%
Taylor expanded in x around 0 89.1%
mul-1-neg89.1%
associate-/l*86.2%
Simplified86.2%
associate-/r/77.7%
Applied egg-rr77.7%
if -3.99999999999999972e-39 < (*.f64 x y) < -9.99999999999999927e-77Initial program 99.2%
Taylor expanded in x around inf 84.9%
associate-*l/84.9%
Simplified84.9%
expm1-log1p-u59.9%
expm1-udef13.1%
*-commutative13.1%
clear-num13.1%
un-div-inv13.1%
Applied egg-rr13.1%
expm1-def59.9%
expm1-log1p84.5%
associate-/r/84.5%
Simplified84.5%
if -9.99999999999999927e-77 < (*.f64 x y) < -5.00000000000000029e-289Initial program 99.4%
Taylor expanded in x around 0 84.4%
*-commutative84.4%
associate-*l/60.2%
associate-*r*60.2%
neg-mul-160.2%
distribute-frac-neg60.2%
Simplified60.2%
if 2.00000000000000003e-119 < (*.f64 x y) < 4e11Initial program 99.4%
Taylor expanded in x around inf 58.0%
if 4e11 < (*.f64 x y) < 2.00000000000000009e42Initial program 99.6%
Taylor expanded in x around 0 86.0%
mul-1-neg86.0%
associate-/l*70.0%
Simplified70.0%
Final simplification73.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ -1.0 (/ a (* z t)))))
(if (<= (* x y) -2e-6)
(/ y (/ a x))
(if (<= (* x y) 5e-56)
t_1
(if (<= (* x y) 400000000000.0)
(/ (* x y) a)
(if (<= (* x y) 1e+75) t_1 (* y (/ x a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -1.0 / (a / (z * t));
double tmp;
if ((x * y) <= -2e-6) {
tmp = y / (a / x);
} else if ((x * y) <= 5e-56) {
tmp = t_1;
} else if ((x * y) <= 400000000000.0) {
tmp = (x * y) / a;
} else if ((x * y) <= 1e+75) {
tmp = t_1;
} else {
tmp = y * (x / 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
real(8) :: t_1
real(8) :: tmp
t_1 = (-1.0d0) / (a / (z * t))
if ((x * y) <= (-2d-6)) then
tmp = y / (a / x)
else if ((x * y) <= 5d-56) then
tmp = t_1
else if ((x * y) <= 400000000000.0d0) then
tmp = (x * y) / a
else if ((x * y) <= 1d+75) then
tmp = t_1
else
tmp = y * (x / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -1.0 / (a / (z * t));
double tmp;
if ((x * y) <= -2e-6) {
tmp = y / (a / x);
} else if ((x * y) <= 5e-56) {
tmp = t_1;
} else if ((x * y) <= 400000000000.0) {
tmp = (x * y) / a;
} else if ((x * y) <= 1e+75) {
tmp = t_1;
} else {
tmp = y * (x / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -1.0 / (a / (z * t)) tmp = 0 if (x * y) <= -2e-6: tmp = y / (a / x) elif (x * y) <= 5e-56: tmp = t_1 elif (x * y) <= 400000000000.0: tmp = (x * y) / a elif (x * y) <= 1e+75: tmp = t_1 else: tmp = y * (x / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(-1.0 / Float64(a / Float64(z * t))) tmp = 0.0 if (Float64(x * y) <= -2e-6) tmp = Float64(y / Float64(a / x)); elseif (Float64(x * y) <= 5e-56) tmp = t_1; elseif (Float64(x * y) <= 400000000000.0) tmp = Float64(Float64(x * y) / a); elseif (Float64(x * y) <= 1e+75) tmp = t_1; else tmp = Float64(y * Float64(x / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -1.0 / (a / (z * t)); tmp = 0.0; if ((x * y) <= -2e-6) tmp = y / (a / x); elseif ((x * y) <= 5e-56) tmp = t_1; elseif ((x * y) <= 400000000000.0) tmp = (x * y) / a; elseif ((x * y) <= 1e+75) tmp = t_1; else tmp = y * (x / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-1.0 / N[(a / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2e-6], N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e-56], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 400000000000.0], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1e+75], t$95$1, N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-1}{\frac{a}{z \cdot t}}\\
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{-6}:\\
\;\;\;\;\frac{y}{\frac{a}{x}}\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{-56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 400000000000:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{elif}\;x \cdot y \leq 10^{+75}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -1.99999999999999991e-6Initial program 91.9%
Taylor expanded in x around inf 81.0%
associate-*l/78.9%
Simplified78.9%
*-commutative78.9%
clear-num78.0%
un-div-inv77.9%
Applied egg-rr77.9%
if -1.99999999999999991e-6 < (*.f64 x y) < 4.99999999999999997e-56 or 4e11 < (*.f64 x y) < 9.99999999999999927e74Initial program 98.0%
Taylor expanded in x around 0 77.6%
*-commutative77.6%
associate-*l/69.0%
associate-*r*69.0%
neg-mul-169.0%
distribute-frac-neg69.0%
Simplified69.0%
associate-*l/77.6%
associate-/l*68.1%
distribute-neg-frac68.1%
clear-num68.1%
distribute-neg-frac68.1%
metadata-eval68.1%
associate-/l/77.6%
Applied egg-rr77.6%
if 4.99999999999999997e-56 < (*.f64 x y) < 4e11Initial program 99.4%
Taylor expanded in x around inf 75.4%
if 9.99999999999999927e74 < (*.f64 x y) Initial program 86.3%
Taylor expanded in x around inf 79.9%
associate-*l/84.4%
Simplified84.4%
Final simplification79.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* z (- t)) a)))
(if (<= (* x y) -2e-6)
(/ y (/ a x))
(if (<= (* x y) 5e-56)
t_1
(if (<= (* x y) 400000000000.0)
(/ (* x y) a)
(if (<= (* x y) 1e+75) t_1 (* y (/ x a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z * -t) / a;
double tmp;
if ((x * y) <= -2e-6) {
tmp = y / (a / x);
} else if ((x * y) <= 5e-56) {
tmp = t_1;
} else if ((x * y) <= 400000000000.0) {
tmp = (x * y) / a;
} else if ((x * y) <= 1e+75) {
tmp = t_1;
} else {
tmp = y * (x / 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
real(8) :: t_1
real(8) :: tmp
t_1 = (z * -t) / a
if ((x * y) <= (-2d-6)) then
tmp = y / (a / x)
else if ((x * y) <= 5d-56) then
tmp = t_1
else if ((x * y) <= 400000000000.0d0) then
tmp = (x * y) / a
else if ((x * y) <= 1d+75) then
tmp = t_1
else
tmp = y * (x / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (z * -t) / a;
double tmp;
if ((x * y) <= -2e-6) {
tmp = y / (a / x);
} else if ((x * y) <= 5e-56) {
tmp = t_1;
} else if ((x * y) <= 400000000000.0) {
tmp = (x * y) / a;
} else if ((x * y) <= 1e+75) {
tmp = t_1;
} else {
tmp = y * (x / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z * -t) / a tmp = 0 if (x * y) <= -2e-6: tmp = y / (a / x) elif (x * y) <= 5e-56: tmp = t_1 elif (x * y) <= 400000000000.0: tmp = (x * y) / a elif (x * y) <= 1e+75: tmp = t_1 else: tmp = y * (x / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z * Float64(-t)) / a) tmp = 0.0 if (Float64(x * y) <= -2e-6) tmp = Float64(y / Float64(a / x)); elseif (Float64(x * y) <= 5e-56) tmp = t_1; elseif (Float64(x * y) <= 400000000000.0) tmp = Float64(Float64(x * y) / a); elseif (Float64(x * y) <= 1e+75) tmp = t_1; else tmp = Float64(y * Float64(x / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z * -t) / a; tmp = 0.0; if ((x * y) <= -2e-6) tmp = y / (a / x); elseif ((x * y) <= 5e-56) tmp = t_1; elseif ((x * y) <= 400000000000.0) tmp = (x * y) / a; elseif ((x * y) <= 1e+75) tmp = t_1; else tmp = y * (x / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z * (-t)), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -2e-6], N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e-56], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 400000000000.0], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1e+75], t$95$1, N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(-t\right)}{a}\\
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{-6}:\\
\;\;\;\;\frac{y}{\frac{a}{x}}\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{-56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 400000000000:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{elif}\;x \cdot y \leq 10^{+75}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -1.99999999999999991e-6Initial program 91.9%
Taylor expanded in x around inf 81.0%
associate-*l/78.9%
Simplified78.9%
*-commutative78.9%
clear-num78.0%
un-div-inv77.9%
Applied egg-rr77.9%
if -1.99999999999999991e-6 < (*.f64 x y) < 4.99999999999999997e-56 or 4e11 < (*.f64 x y) < 9.99999999999999927e74Initial program 98.0%
Taylor expanded in x around 0 77.6%
mul-1-neg77.6%
distribute-rgt-neg-in77.6%
Simplified77.6%
if 4.99999999999999997e-56 < (*.f64 x y) < 4e11Initial program 99.4%
Taylor expanded in x around inf 75.4%
if 9.99999999999999927e74 < (*.f64 x y) Initial program 86.3%
Taylor expanded in x around inf 79.9%
associate-*l/84.4%
Simplified84.4%
Final simplification79.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (- (* x y) (* z t)) a))) (if (<= t_1 (- INFINITY)) (- (/ x (/ a y)) (* t (/ z a))) t_1)))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((x * y) - (z * t)) / a;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x / (a / y)) - (t * (z / a));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((x * y) - (z * t)) / a;
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (x / (a / y)) - (t * (z / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((x * y) - (z * t)) / a tmp = 0 if t_1 <= -math.inf: tmp = (x / (a / y)) - (t * (z / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(x * y) - Float64(z * t)) / a) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(x / Float64(a / y)) - Float64(t * Float64(z / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((x * y) - (z * t)) / a; tmp = 0.0; if (t_1 <= -Inf) tmp = (x / (a / y)) - (t * (z / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x / N[(a / y), $MachinePrecision]), $MachinePrecision] - N[(t * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot y - z \cdot t}{a}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{x}{\frac{a}{y}} - t \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 (-.f64 (*.f64 x y) (*.f64 z t)) a) < -inf.0Initial program 85.7%
div-sub83.8%
associate-/l*92.7%
associate-/l*98.0%
Applied egg-rr98.0%
associate-/r/98.1%
Applied egg-rr98.1%
if -inf.0 < (/.f64 (-.f64 (*.f64 x y) (*.f64 z t)) a) Initial program 95.9%
Final simplification96.4%
(FPCore (x y z t a)
:precision binary64
(if (<= (* x y) -2e-6)
(/ y (/ a x))
(if (<= (* x y) 2e-119)
(* (- z) (/ t a))
(if (<= (* x y) 1e+240) (/ (* x y) a) (* x (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e-6) {
tmp = y / (a / x);
} else if ((x * y) <= 2e-119) {
tmp = -z * (t / a);
} else if ((x * y) <= 1e+240) {
tmp = (x * y) / a;
} else {
tmp = x * (y / 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
real(8) :: tmp
if ((x * y) <= (-2d-6)) then
tmp = y / (a / x)
else if ((x * y) <= 2d-119) then
tmp = -z * (t / a)
else if ((x * y) <= 1d+240) then
tmp = (x * y) / a
else
tmp = x * (y / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e-6) {
tmp = y / (a / x);
} else if ((x * y) <= 2e-119) {
tmp = -z * (t / a);
} else if ((x * y) <= 1e+240) {
tmp = (x * y) / a;
} else {
tmp = x * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x * y) <= -2e-6: tmp = y / (a / x) elif (x * y) <= 2e-119: tmp = -z * (t / a) elif (x * y) <= 1e+240: tmp = (x * y) / a else: tmp = x * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(x * y) <= -2e-6) tmp = Float64(y / Float64(a / x)); elseif (Float64(x * y) <= 2e-119) tmp = Float64(Float64(-z) * Float64(t / a)); elseif (Float64(x * y) <= 1e+240) tmp = Float64(Float64(x * y) / a); else tmp = Float64(x * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x * y) <= -2e-6) tmp = y / (a / x); elseif ((x * y) <= 2e-119) tmp = -z * (t / a); elseif ((x * y) <= 1e+240) tmp = (x * y) / a; else tmp = x * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e-6], N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e-119], N[((-z) * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 1e+240], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{-6}:\\
\;\;\;\;\frac{y}{\frac{a}{x}}\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-119}:\\
\;\;\;\;\left(-z\right) \cdot \frac{t}{a}\\
\mathbf{elif}\;x \cdot y \leq 10^{+240}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -1.99999999999999991e-6Initial program 91.9%
Taylor expanded in x around inf 81.0%
associate-*l/78.9%
Simplified78.9%
*-commutative78.9%
clear-num78.0%
un-div-inv77.9%
Applied egg-rr77.9%
if -1.99999999999999991e-6 < (*.f64 x y) < 2.00000000000000003e-119Initial program 97.4%
Taylor expanded in x around 0 84.3%
mul-1-neg84.3%
associate-/l*77.0%
Simplified77.0%
associate-/r/74.8%
Applied egg-rr74.8%
if 2.00000000000000003e-119 < (*.f64 x y) < 1.00000000000000001e240Initial program 98.4%
Taylor expanded in x around inf 63.2%
if 1.00000000000000001e240 < (*.f64 x y) Initial program 77.5%
Taylor expanded in x around inf 77.5%
associate-*l/91.4%
Simplified91.4%
expm1-log1p-u36.7%
expm1-udef36.7%
*-commutative36.7%
clear-num36.7%
un-div-inv36.7%
Applied egg-rr36.7%
expm1-def36.7%
expm1-log1p91.3%
associate-/r/91.2%
Simplified91.2%
Final simplification74.3%
(FPCore (x y z t a) :precision binary64 (if (<= (* x y) 1e+240) (/ (- (* x y) (* z t)) a) (* x (/ y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= 1e+240) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = x * (y / 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
real(8) :: tmp
if ((x * y) <= 1d+240) then
tmp = ((x * y) - (z * t)) / a
else
tmp = x * (y / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= 1e+240) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = x * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x * y) <= 1e+240: tmp = ((x * y) - (z * t)) / a else: tmp = x * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(x * y) <= 1e+240) tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a); else tmp = Float64(x * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x * y) <= 1e+240) tmp = ((x * y) - (z * t)) / a; else tmp = x * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], 1e+240], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq 10^{+240}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < 1.00000000000000001e240Initial program 96.3%
if 1.00000000000000001e240 < (*.f64 x y) Initial program 77.5%
Taylor expanded in x around inf 77.5%
associate-*l/91.4%
Simplified91.4%
expm1-log1p-u36.7%
expm1-udef36.7%
*-commutative36.7%
clear-num36.7%
un-div-inv36.7%
Applied egg-rr36.7%
expm1-def36.7%
expm1-log1p91.3%
associate-/r/91.2%
Simplified91.2%
Final simplification95.6%
(FPCore (x y z t a) :precision binary64 (if (<= t 2.7e+41) (/ (* x y) a) (* x (/ y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 2.7e+41) {
tmp = (x * y) / a;
} else {
tmp = x * (y / 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
real(8) :: tmp
if (t <= 2.7d+41) then
tmp = (x * y) / a
else
tmp = x * (y / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 2.7e+41) {
tmp = (x * y) / a;
} else {
tmp = x * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 2.7e+41: tmp = (x * y) / a else: tmp = x * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 2.7e+41) tmp = Float64(Float64(x * y) / a); else tmp = Float64(x * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 2.7e+41) tmp = (x * y) / a; else tmp = x * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 2.7e+41], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision], N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.7 \cdot 10^{+41}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < 2.7e41Initial program 93.9%
Taylor expanded in x around inf 62.1%
if 2.7e41 < t Initial program 93.4%
Taylor expanded in x around inf 32.8%
associate-*l/33.0%
Simplified33.0%
expm1-log1p-u20.2%
expm1-udef18.6%
*-commutative18.6%
clear-num18.6%
un-div-inv18.6%
Applied egg-rr18.6%
expm1-def20.2%
expm1-log1p32.9%
associate-/r/36.2%
Simplified36.2%
Final simplification56.3%
(FPCore (x y z t a) :precision binary64 (* y (/ x a)))
double code(double x, double y, double z, double t, double a) {
return y * (x / a);
}
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 = y * (x / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return y * (x / a);
}
def code(x, y, z, t, a): return y * (x / a)
function code(x, y, z, t, a) return Float64(y * Float64(x / a)) end
function tmp = code(x, y, z, t, a) tmp = y * (x / a); end
code[x_, y_, z_, t_, a_] := N[(y * N[(x / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \frac{x}{a}
\end{array}
Initial program 93.8%
Taylor expanded in x around inf 55.5%
associate-*l/54.2%
Simplified54.2%
Final simplification54.2%
(FPCore (x y z t a) :precision binary64 (* x (/ y a)))
double code(double x, double y, double z, double t, double a) {
return x * (y / a);
}
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 / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x * (y / a);
}
def code(x, y, z, t, a): return x * (y / a)
function code(x, y, z, t, a) return Float64(x * Float64(y / a)) end
function tmp = code(x, y, z, t, a) tmp = x * (y / a); end
code[x_, y_, z_, t_, a_] := N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \frac{y}{a}
\end{array}
Initial program 93.8%
Taylor expanded in x around inf 55.5%
associate-*l/54.2%
Simplified54.2%
expm1-log1p-u30.8%
expm1-udef23.0%
*-commutative23.0%
clear-num23.0%
un-div-inv23.0%
Applied egg-rr23.0%
expm1-def30.2%
expm1-log1p53.6%
associate-/r/55.7%
Simplified55.7%
Final simplification55.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* (/ y a) x) (* (/ t a) z))))
(if (< z -2.468684968699548e+170)
t_1
(if (< z 6.309831121978371e-71) (/ (- (* x y) (* z t)) a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y / a) * x) - ((t / a) * z);
double tmp;
if (z < -2.468684968699548e+170) {
tmp = t_1;
} else if (z < 6.309831121978371e-71) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = t_1;
}
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
real(8) :: t_1
real(8) :: tmp
t_1 = ((y / a) * x) - ((t / a) * z)
if (z < (-2.468684968699548d+170)) then
tmp = t_1
else if (z < 6.309831121978371d-71) then
tmp = ((x * y) - (z * t)) / a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((y / a) * x) - ((t / a) * z);
double tmp;
if (z < -2.468684968699548e+170) {
tmp = t_1;
} else if (z < 6.309831121978371e-71) {
tmp = ((x * y) - (z * t)) / a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((y / a) * x) - ((t / a) * z) tmp = 0 if z < -2.468684968699548e+170: tmp = t_1 elif z < 6.309831121978371e-71: tmp = ((x * y) - (z * t)) / a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y / a) * x) - Float64(Float64(t / a) * z)) tmp = 0.0 if (z < -2.468684968699548e+170) tmp = t_1; elseif (z < 6.309831121978371e-71) tmp = Float64(Float64(Float64(x * y) - Float64(z * t)) / a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((y / a) * x) - ((t / a) * z); tmp = 0.0; if (z < -2.468684968699548e+170) tmp = t_1; elseif (z < 6.309831121978371e-71) tmp = ((x * y) - (z * t)) / a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y / a), $MachinePrecision] * x), $MachinePrecision] - N[(N[(t / a), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -2.468684968699548e+170], t$95$1, If[Less[z, 6.309831121978371e-71], N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot x - \frac{t}{a} \cdot z\\
\mathbf{if}\;z < -2.468684968699548 \cdot 10^{+170}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z < 6.309831121978371 \cdot 10^{-71}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023310
(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))