
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - 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)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - 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)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
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 - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
Initial program 84.7%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.1%
Applied egg-rr98.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ (- z a) z)))))
(if (<= z -5.1e-48)
t_1
(if (<= z 2.05e-67) (+ x (* y (/ (- t z) a))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / ((z - a) / z));
double tmp;
if (z <= -5.1e-48) {
tmp = t_1;
} else if (z <= 2.05e-67) {
tmp = x + (y * ((t - z) / 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 = x + (y / ((z - a) / z))
if (z <= (-5.1d-48)) then
tmp = t_1
else if (z <= 2.05d-67) then
tmp = x + (y * ((t - z) / 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 = x + (y / ((z - a) / z));
double tmp;
if (z <= -5.1e-48) {
tmp = t_1;
} else if (z <= 2.05e-67) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / ((z - a) / z)) tmp = 0 if z <= -5.1e-48: tmp = t_1 elif z <= 2.05e-67: tmp = x + (y * ((t - z) / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(Float64(z - a) / z))) tmp = 0.0 if (z <= -5.1e-48) tmp = t_1; elseif (z <= 2.05e-67) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / ((z - a) / z)); tmp = 0.0; if (z <= -5.1e-48) tmp = t_1; elseif (z <= 2.05e-67) tmp = x + (y * ((t - z) / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.1e-48], t$95$1, If[LessEqual[z, 2.05e-67], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{z - a}{z}}\\
\mathbf{if}\;z \leq -5.1 \cdot 10^{-48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{-67}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.10000000000000011e-48 or 2.0499999999999999e-67 < z Initial program 79.8%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.9%
Applied egg-rr99.9%
Taylor expanded in z around inf
Simplified88.3%
if -5.10000000000000011e-48 < z < 2.0499999999999999e-67Initial program 93.7%
Taylor expanded in a around inf
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6482.6%
Simplified82.6%
Final simplification86.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ (- z a) z)))))
(if (<= z -1.95e-47)
t_1
(if (<= z 3.1e-106) (+ x (* t (* y (/ 1.0 a)))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / ((z - a) / z));
double tmp;
if (z <= -1.95e-47) {
tmp = t_1;
} else if (z <= 3.1e-106) {
tmp = x + (t * (y * (1.0 / 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 = x + (y / ((z - a) / z))
if (z <= (-1.95d-47)) then
tmp = t_1
else if (z <= 3.1d-106) then
tmp = x + (t * (y * (1.0d0 / 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 = x + (y / ((z - a) / z));
double tmp;
if (z <= -1.95e-47) {
tmp = t_1;
} else if (z <= 3.1e-106) {
tmp = x + (t * (y * (1.0 / a)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / ((z - a) / z)) tmp = 0 if z <= -1.95e-47: tmp = t_1 elif z <= 3.1e-106: tmp = x + (t * (y * (1.0 / a))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(Float64(z - a) / z))) tmp = 0.0 if (z <= -1.95e-47) tmp = t_1; elseif (z <= 3.1e-106) tmp = Float64(x + Float64(t * Float64(y * Float64(1.0 / a)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / ((z - a) / z)); tmp = 0.0; if (z <= -1.95e-47) tmp = t_1; elseif (z <= 3.1e-106) tmp = x + (t * (y * (1.0 / a))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.95e-47], t$95$1, If[LessEqual[z, 3.1e-106], N[(x + N[(t * N[(y * N[(1.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{z - a}{z}}\\
\mathbf{if}\;z \leq -1.95 \cdot 10^{-47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-106}:\\
\;\;\;\;x + t \cdot \left(y \cdot \frac{1}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.94999999999999989e-47 or 3.09999999999999985e-106 < z Initial program 80.6%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.9%
Applied egg-rr99.9%
Taylor expanded in z around inf
Simplified86.9%
if -1.94999999999999989e-47 < z < 3.09999999999999985e-106Initial program 94.0%
Taylor expanded in z around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6482.6%
Simplified82.6%
div-invN/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6484.9%
Applied egg-rr84.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -5e-39) (+ x (/ y (/ z (- z t)))) (if (<= z 2.6e-74) (+ x (* t (* y (/ 1.0 a)))) (+ x (* z (/ y (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e-39) {
tmp = x + (y / (z / (z - t)));
} else if (z <= 2.6e-74) {
tmp = x + (t * (y * (1.0 / a)));
} else {
tmp = x + (z * (y / (z - 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 (z <= (-5d-39)) then
tmp = x + (y / (z / (z - t)))
else if (z <= 2.6d-74) then
tmp = x + (t * (y * (1.0d0 / a)))
else
tmp = x + (z * (y / (z - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e-39) {
tmp = x + (y / (z / (z - t)));
} else if (z <= 2.6e-74) {
tmp = x + (t * (y * (1.0 / a)));
} else {
tmp = x + (z * (y / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5e-39: tmp = x + (y / (z / (z - t))) elif z <= 2.6e-74: tmp = x + (t * (y * (1.0 / a))) else: tmp = x + (z * (y / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5e-39) tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); elseif (z <= 2.6e-74) tmp = Float64(x + Float64(t * Float64(y * Float64(1.0 / a)))); else tmp = Float64(x + Float64(z * Float64(y / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5e-39) tmp = x + (y / (z / (z - t))); elseif (z <= 2.6e-74) tmp = x + (t * (y * (1.0 / a))); else tmp = x + (z * (y / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5e-39], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e-74], N[(x + N[(t * N[(y * N[(1.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-39}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-74}:\\
\;\;\;\;x + t \cdot \left(y \cdot \frac{1}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{z - a}\\
\end{array}
\end{array}
if z < -4.9999999999999998e-39Initial program 83.7%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f64100.0%
Applied egg-rr100.0%
Taylor expanded in a around 0
/-lowering-/.f64N/A
--lowering--.f6482.5%
Simplified82.5%
if -4.9999999999999998e-39 < z < 2.6000000000000001e-74Initial program 93.6%
Taylor expanded in z around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6477.3%
Simplified77.3%
div-invN/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6480.4%
Applied egg-rr80.4%
if 2.6000000000000001e-74 < z Initial program 76.6%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.6%
Applied egg-rr97.6%
Taylor expanded in z around inf
Simplified89.2%
Final simplification84.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.16e-38) (+ x (* y (- 1.0 (/ t z)))) (if (<= z 8e-77) (+ x (* t (* y (/ 1.0 a)))) (+ x (* z (/ y (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.16e-38) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 8e-77) {
tmp = x + (t * (y * (1.0 / a)));
} else {
tmp = x + (z * (y / (z - 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 (z <= (-1.16d-38)) then
tmp = x + (y * (1.0d0 - (t / z)))
else if (z <= 8d-77) then
tmp = x + (t * (y * (1.0d0 / a)))
else
tmp = x + (z * (y / (z - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.16e-38) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 8e-77) {
tmp = x + (t * (y * (1.0 / a)));
} else {
tmp = x + (z * (y / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.16e-38: tmp = x + (y * (1.0 - (t / z))) elif z <= 8e-77: tmp = x + (t * (y * (1.0 / a))) else: tmp = x + (z * (y / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.16e-38) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); elseif (z <= 8e-77) tmp = Float64(x + Float64(t * Float64(y * Float64(1.0 / a)))); else tmp = Float64(x + Float64(z * Float64(y / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.16e-38) tmp = x + (y * (1.0 - (t / z))); elseif (z <= 8e-77) tmp = x + (t * (y * (1.0 / a))); else tmp = x + (z * (y / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.16e-38], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-77], N[(x + N[(t * N[(y * N[(1.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.16 \cdot 10^{-38}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-77}:\\
\;\;\;\;x + t \cdot \left(y \cdot \frac{1}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{z - a}\\
\end{array}
\end{array}
if z < -1.15999999999999995e-38Initial program 83.7%
Taylor expanded in a around 0
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
*-inversesN/A
--lowering--.f64N/A
/-lowering-/.f6482.5%
Simplified82.5%
if -1.15999999999999995e-38 < z < 7.9999999999999994e-77Initial program 93.6%
Taylor expanded in z around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6477.3%
Simplified77.3%
div-invN/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6480.4%
Applied egg-rr80.4%
if 7.9999999999999994e-77 < z Initial program 76.6%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.6%
Applied egg-rr97.6%
Taylor expanded in z around inf
Simplified89.2%
Final simplification84.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ t a)))))
(if (<= a -1.75e-10)
t_1
(if (<= a 1.5e+81) (+ x (* y (- 1.0 (/ t z)))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (t / a));
double tmp;
if (a <= -1.75e-10) {
tmp = t_1;
} else if (a <= 1.5e+81) {
tmp = x + (y * (1.0 - (t / z)));
} 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 = x + (y * (t / a))
if (a <= (-1.75d-10)) then
tmp = t_1
else if (a <= 1.5d+81) then
tmp = x + (y * (1.0d0 - (t / z)))
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 = x + (y * (t / a));
double tmp;
if (a <= -1.75e-10) {
tmp = t_1;
} else if (a <= 1.5e+81) {
tmp = x + (y * (1.0 - (t / z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (t / a)) tmp = 0 if a <= -1.75e-10: tmp = t_1 elif a <= 1.5e+81: tmp = x + (y * (1.0 - (t / z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(t / a))) tmp = 0.0 if (a <= -1.75e-10) tmp = t_1; elseif (a <= 1.5e+81) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (t / a)); tmp = 0.0; if (a <= -1.75e-10) tmp = t_1; elseif (a <= 1.5e+81) tmp = x + (y * (1.0 - (t / z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.75e-10], t$95$1, If[LessEqual[a, 1.5e+81], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{t}{a}\\
\mathbf{if}\;a \leq -1.75 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{+81}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.7499999999999999e-10 or 1.49999999999999999e81 < a Initial program 84.3%
Taylor expanded in z around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6474.2%
Simplified74.2%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6480.6%
Applied egg-rr80.6%
if -1.7499999999999999e-10 < a < 1.49999999999999999e81Initial program 85.0%
Taylor expanded in a around 0
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
div-subN/A
*-inversesN/A
--lowering--.f64N/A
/-lowering-/.f6484.7%
Simplified84.7%
Final simplification83.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.04e-38) (+ x y) (if (<= z 1.05e-50) (+ x (* t (* y (/ 1.0 a)))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.04e-38) {
tmp = x + y;
} else if (z <= 1.05e-50) {
tmp = x + (t * (y * (1.0 / a)));
} else {
tmp = x + y;
}
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 (z <= (-1.04d-38)) then
tmp = x + y
else if (z <= 1.05d-50) then
tmp = x + (t * (y * (1.0d0 / a)))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.04e-38) {
tmp = x + y;
} else if (z <= 1.05e-50) {
tmp = x + (t * (y * (1.0 / a)));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.04e-38: tmp = x + y elif z <= 1.05e-50: tmp = x + (t * (y * (1.0 / a))) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.04e-38) tmp = Float64(x + y); elseif (z <= 1.05e-50) tmp = Float64(x + Float64(t * Float64(y * Float64(1.0 / a)))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.04e-38) tmp = x + y; elseif (z <= 1.05e-50) tmp = x + (t * (y * (1.0 / a))); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.04e-38], N[(x + y), $MachinePrecision], If[LessEqual[z, 1.05e-50], N[(x + N[(t * N[(y * N[(1.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.04 \cdot 10^{-38}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-50}:\\
\;\;\;\;x + t \cdot \left(y \cdot \frac{1}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.04e-38 or 1.05e-50 < z Initial program 79.3%
Taylor expanded in z around inf
+-commutativeN/A
+-lowering-+.f6477.9%
Simplified77.9%
if -1.04e-38 < z < 1.05e-50Initial program 94.0%
Taylor expanded in z around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6478.5%
Simplified78.5%
div-invN/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6481.4%
Applied egg-rr81.4%
Final simplification79.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.2e+19) (+ x y) (if (<= z 6.2e-51) (+ x (/ (* y t) a)) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+19) {
tmp = x + y;
} else if (z <= 6.2e-51) {
tmp = x + ((y * t) / a);
} else {
tmp = x + y;
}
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 (z <= (-3.2d+19)) then
tmp = x + y
else if (z <= 6.2d-51) then
tmp = x + ((y * t) / a)
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+19) {
tmp = x + y;
} else if (z <= 6.2e-51) {
tmp = x + ((y * t) / a);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.2e+19: tmp = x + y elif z <= 6.2e-51: tmp = x + ((y * t) / a) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.2e+19) tmp = Float64(x + y); elseif (z <= 6.2e-51) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.2e+19) tmp = x + y; elseif (z <= 6.2e-51) tmp = x + ((y * t) / a); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2e+19], N[(x + y), $MachinePrecision], If[LessEqual[z, 6.2e-51], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+19}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-51}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -3.2e19 or 6.1999999999999995e-51 < z Initial program 77.3%
Taylor expanded in z around inf
+-commutativeN/A
+-lowering-+.f6480.4%
Simplified80.4%
if -3.2e19 < z < 6.1999999999999995e-51Initial program 94.7%
Taylor expanded in z around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6476.0%
Simplified76.0%
Final simplification78.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.02e+18) (+ x y) (if (<= z 2.3e-51) (+ x (/ y (/ a t))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.02e+18) {
tmp = x + y;
} else if (z <= 2.3e-51) {
tmp = x + (y / (a / t));
} else {
tmp = x + y;
}
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 (z <= (-1.02d+18)) then
tmp = x + y
else if (z <= 2.3d-51) then
tmp = x + (y / (a / t))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.02e+18) {
tmp = x + y;
} else if (z <= 2.3e-51) {
tmp = x + (y / (a / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.02e+18: tmp = x + y elif z <= 2.3e-51: tmp = x + (y / (a / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.02e+18) tmp = Float64(x + y); elseif (z <= 2.3e-51) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.02e+18) tmp = x + y; elseif (z <= 2.3e-51) tmp = x + (y / (a / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.02e+18], N[(x + y), $MachinePrecision], If[LessEqual[z, 2.3e-51], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{+18}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-51}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.02e18 or 2.30000000000000002e-51 < z Initial program 77.3%
Taylor expanded in z around inf
+-commutativeN/A
+-lowering-+.f6480.4%
Simplified80.4%
if -1.02e18 < z < 2.30000000000000002e-51Initial program 94.7%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6495.6%
Applied egg-rr95.6%
Taylor expanded in z around 0
/-lowering-/.f6475.1%
Simplified75.1%
Final simplification78.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.8e+17) (+ x y) (if (<= z 2e-51) (+ x (* y (/ t a))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.8e+17) {
tmp = x + y;
} else if (z <= 2e-51) {
tmp = x + (y * (t / a));
} else {
tmp = x + y;
}
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 (z <= (-9.8d+17)) then
tmp = x + y
else if (z <= 2d-51) then
tmp = x + (y * (t / a))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.8e+17) {
tmp = x + y;
} else if (z <= 2e-51) {
tmp = x + (y * (t / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.8e+17: tmp = x + y elif z <= 2e-51: tmp = x + (y * (t / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.8e+17) tmp = Float64(x + y); elseif (z <= 2e-51) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.8e+17) tmp = x + y; elseif (z <= 2e-51) tmp = x + (y * (t / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.8e+17], N[(x + y), $MachinePrecision], If[LessEqual[z, 2e-51], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.8 \cdot 10^{+17}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-51}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -9.8e17 or 2e-51 < z Initial program 77.3%
Taylor expanded in z around inf
+-commutativeN/A
+-lowering-+.f6480.4%
Simplified80.4%
if -9.8e17 < z < 2e-51Initial program 94.7%
Taylor expanded in z around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6476.0%
Simplified76.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6475.0%
Applied egg-rr75.0%
Final simplification78.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.85e+233) (* y (/ t a)) (if (<= t 7.8e+245) (+ x y) (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.85e+233) {
tmp = y * (t / a);
} else if (t <= 7.8e+245) {
tmp = x + y;
} else {
tmp = (y * t) / 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 <= (-1.85d+233)) then
tmp = y * (t / a)
else if (t <= 7.8d+245) then
tmp = x + y
else
tmp = (y * t) / 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 <= -1.85e+233) {
tmp = y * (t / a);
} else if (t <= 7.8e+245) {
tmp = x + y;
} else {
tmp = (y * t) / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.85e+233: tmp = y * (t / a) elif t <= 7.8e+245: tmp = x + y else: tmp = (y * t) / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.85e+233) tmp = Float64(y * Float64(t / a)); elseif (t <= 7.8e+245) tmp = Float64(x + y); else tmp = Float64(Float64(y * t) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.85e+233) tmp = y * (t / a); elseif (t <= 7.8e+245) tmp = x + y; else tmp = (y * t) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.85e+233], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e+245], N[(x + y), $MachinePrecision], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.85 \cdot 10^{+233}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+245}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\end{array}
\end{array}
if t < -1.8499999999999999e233Initial program 88.0%
Taylor expanded in z around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6457.3%
Simplified57.3%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6463.1%
Applied egg-rr63.1%
Taylor expanded in x around 0
*-commutativeN/A
associate-*r/N/A
*-lowering-*.f64N/A
/-lowering-/.f6451.2%
Simplified51.2%
if -1.8499999999999999e233 < t < 7.7999999999999996e245Initial program 83.7%
Taylor expanded in z around inf
+-commutativeN/A
+-lowering-+.f6471.8%
Simplified71.8%
if 7.7999999999999996e245 < t Initial program 100.0%
Taylor expanded in z around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6475.8%
Simplified75.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6475.8%
Simplified75.8%
Final simplification70.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (/ t a)))) (if (<= t -3.7e+227) t_1 (if (<= t 1.58e+243) (+ x y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / a);
double tmp;
if (t <= -3.7e+227) {
tmp = t_1;
} else if (t <= 1.58e+243) {
tmp = x + y;
} 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 * (t / a)
if (t <= (-3.7d+227)) then
tmp = t_1
else if (t <= 1.58d+243) then
tmp = x + y
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 * (t / a);
double tmp;
if (t <= -3.7e+227) {
tmp = t_1;
} else if (t <= 1.58e+243) {
tmp = x + y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (t / a) tmp = 0 if t <= -3.7e+227: tmp = t_1 elif t <= 1.58e+243: tmp = x + y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(t / a)) tmp = 0.0 if (t <= -3.7e+227) tmp = t_1; elseif (t <= 1.58e+243) tmp = Float64(x + y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (t / a); tmp = 0.0; if (t <= -3.7e+227) tmp = t_1; elseif (t <= 1.58e+243) tmp = x + y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.7e+227], t$95$1, If[LessEqual[t, 1.58e+243], N[(x + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{a}\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+227}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.58 \cdot 10^{+243}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.6999999999999999e227 or 1.57999999999999997e243 < t Initial program 90.1%
Taylor expanded in z around 0
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6463.2%
Simplified63.2%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6466.4%
Applied egg-rr66.4%
Taylor expanded in x around 0
*-commutativeN/A
associate-*r/N/A
*-lowering-*.f64N/A
/-lowering-/.f6459.9%
Simplified59.9%
if -3.6999999999999999e227 < t < 1.57999999999999997e243Initial program 84.0%
Taylor expanded in z around inf
+-commutativeN/A
+-lowering-+.f6472.0%
Simplified72.0%
Final simplification70.7%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.5e+113) y (if (<= y 2.6e+106) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.5e+113) {
tmp = y;
} else if (y <= 2.6e+106) {
tmp = x;
} else {
tmp = y;
}
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 (y <= (-1.5d+113)) then
tmp = y
else if (y <= 2.6d+106) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.5e+113) {
tmp = y;
} else if (y <= 2.6e+106) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.5e+113: tmp = y elif y <= 2.6e+106: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.5e+113) tmp = y; elseif (y <= 2.6e+106) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.5e+113) tmp = y; elseif (y <= 2.6e+106) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.5e+113], y, If[LessEqual[y, 2.6e+106], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+113}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+106}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -1.5e113 or 2.6000000000000002e106 < y Initial program 61.3%
Taylor expanded in z around inf
+-commutativeN/A
+-lowering-+.f6453.4%
Simplified53.4%
Taylor expanded in y around inf
Simplified44.3%
if -1.5e113 < y < 2.6000000000000002e106Initial program 97.0%
Taylor expanded in x around inf
Simplified65.5%
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - 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) / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
Initial program 84.7%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6498.0%
Applied egg-rr98.0%
Final simplification98.0%
(FPCore (x y z t a) :precision binary64 (+ x (* (- z t) (/ y (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (z - 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 + ((z - t) * (y / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (z - a)));
}
def code(x, y, z, t, a): return x + ((z - t) * (y / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) * Float64(y / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) * (y / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(z - t\right) \cdot \frac{y}{z - a}
\end{array}
Initial program 84.7%
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6494.0%
Applied egg-rr94.0%
Final simplification94.0%
(FPCore (x y z t a) :precision binary64 (if (<= a 9e+115) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 9e+115) {
tmp = x + y;
} else {
tmp = x;
}
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 (a <= 9d+115) then
tmp = x + y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 9e+115) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= 9e+115: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= 9e+115) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= 9e+115) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, 9e+115], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 9 \cdot 10^{+115}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < 8.99999999999999927e115Initial program 84.6%
Taylor expanded in z around inf
+-commutativeN/A
+-lowering-+.f6469.4%
Simplified69.4%
if 8.99999999999999927e115 < a Initial program 85.3%
Taylor expanded in x around inf
Simplified63.5%
Final simplification68.5%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 84.7%
Taylor expanded in x around inf
Simplified48.6%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
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 - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
herbie shell --seed 2024158
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:alt
(! :herbie-platform default (+ x (/ y (/ (- z a) (- z t)))))
(+ x (/ (* y (- z t)) (- z a))))