
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - 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 - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - 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 - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- z t) y) (- a t))))
(if (or (<= t_1 -1e+247) (not (<= t_1 5e-47)))
(+ x (* (- z t) (/ y (- a t))))
(+ x t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((z - t) * y) / (a - t);
double tmp;
if ((t_1 <= -1e+247) || !(t_1 <= 5e-47)) {
tmp = x + ((z - t) * (y / (a - t)));
} else {
tmp = x + 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 = ((z - t) * y) / (a - t)
if ((t_1 <= (-1d+247)) .or. (.not. (t_1 <= 5d-47))) then
tmp = x + ((z - t) * (y / (a - t)))
else
tmp = x + 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 = ((z - t) * y) / (a - t);
double tmp;
if ((t_1 <= -1e+247) || !(t_1 <= 5e-47)) {
tmp = x + ((z - t) * (y / (a - t)));
} else {
tmp = x + t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((z - t) * y) / (a - t) tmp = 0 if (t_1 <= -1e+247) or not (t_1 <= 5e-47): tmp = x + ((z - t) * (y / (a - t))) else: tmp = x + t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(z - t) * y) / Float64(a - t)) tmp = 0.0 if ((t_1 <= -1e+247) || !(t_1 <= 5e-47)) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))); else tmp = Float64(x + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((z - t) * y) / (a - t); tmp = 0.0; if ((t_1 <= -1e+247) || ~((t_1 <= 5e-47))) tmp = x + ((z - t) * (y / (a - t))); else tmp = x + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+247], N[Not[LessEqual[t$95$1, 5e-47]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+247} \lor \neg \left(t_1 \leq 5 \cdot 10^{-47}\right):\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + t_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) < -9.99999999999999952e246 or 5.00000000000000011e-47 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) Initial program 63.4%
associate-*l/99.9%
Applied egg-rr99.9%
if -9.99999999999999952e246 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) < 5.00000000000000011e-47Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a) :precision binary64 (fma (/ (- z t) (- a t)) y x))
double code(double x, double y, double z, double t, double a) {
return fma(((z - t) / (a - t)), y, x);
}
function code(x, y, z, t, a) return fma(Float64(Float64(z - t) / Float64(a - t)), y, x) end
code[x_, y_, z_, t_, a_] := N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{z - t}{a - t}, y, x\right)
\end{array}
Initial program 84.1%
+-commutative84.1%
*-commutative84.1%
associate-*l/99.2%
fma-def99.2%
Simplified99.2%
Final simplification99.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ y (- a t))))))
(if (<= x -2e-20)
t_1
(if (<= x 8.3e-41)
(* (/ (- z t) (- a t)) y)
(if (or (<= x 8.8e+17) (not (<= x 4.2e+88))) t_1 (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / (a - t)));
double tmp;
if (x <= -2e-20) {
tmp = t_1;
} else if (x <= 8.3e-41) {
tmp = ((z - t) / (a - t)) * y;
} else if ((x <= 8.8e+17) || !(x <= 4.2e+88)) {
tmp = t_1;
} else {
tmp = y + 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) :: t_1
real(8) :: tmp
t_1 = x + (z * (y / (a - t)))
if (x <= (-2d-20)) then
tmp = t_1
else if (x <= 8.3d-41) then
tmp = ((z - t) / (a - t)) * y
else if ((x <= 8.8d+17) .or. (.not. (x <= 4.2d+88))) then
tmp = t_1
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / (a - t)));
double tmp;
if (x <= -2e-20) {
tmp = t_1;
} else if (x <= 8.3e-41) {
tmp = ((z - t) / (a - t)) * y;
} else if ((x <= 8.8e+17) || !(x <= 4.2e+88)) {
tmp = t_1;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * (y / (a - t))) tmp = 0 if x <= -2e-20: tmp = t_1 elif x <= 8.3e-41: tmp = ((z - t) / (a - t)) * y elif (x <= 8.8e+17) or not (x <= 4.2e+88): tmp = t_1 else: tmp = y + x return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(y / Float64(a - t)))) tmp = 0.0 if (x <= -2e-20) tmp = t_1; elseif (x <= 8.3e-41) tmp = Float64(Float64(Float64(z - t) / Float64(a - t)) * y); elseif ((x <= 8.8e+17) || !(x <= 4.2e+88)) tmp = t_1; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * (y / (a - t))); tmp = 0.0; if (x <= -2e-20) tmp = t_1; elseif (x <= 8.3e-41) tmp = ((z - t) / (a - t)) * y; elseif ((x <= 8.8e+17) || ~((x <= 4.2e+88))) tmp = t_1; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2e-20], t$95$1, If[LessEqual[x, 8.3e-41], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[Or[LessEqual[x, 8.8e+17], N[Not[LessEqual[x, 4.2e+88]], $MachinePrecision]], t$95$1, N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a - t}\\
\mathbf{if}\;x \leq -2 \cdot 10^{-20}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 8.3 \cdot 10^{-41}:\\
\;\;\;\;\frac{z - t}{a - t} \cdot y\\
\mathbf{elif}\;x \leq 8.8 \cdot 10^{+17} \lor \neg \left(x \leq 4.2 \cdot 10^{+88}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if x < -1.99999999999999989e-20 or 8.3000000000000004e-41 < x < 8.8e17 or 4.2e88 < x Initial program 85.5%
Taylor expanded in z around inf 85.6%
associate-*l/91.6%
*-commutative91.6%
Simplified91.6%
if -1.99999999999999989e-20 < x < 8.3000000000000004e-41Initial program 83.7%
associate-*l/92.1%
Applied egg-rr92.1%
Taylor expanded in y around inf 85.9%
div-sub85.9%
Simplified85.9%
if 8.8e17 < x < 4.2e88Initial program 73.7%
Taylor expanded in t around inf 100.0%
+-commutative100.0%
Simplified100.0%
Final simplification89.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -4.7e-212)
(+ y x)
(if (or (<= t -6.6e-274) (and (not (<= t -9.5e-296)) (<= t 2.35e-169)))
(/ (* z y) a)
(+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.7e-212) {
tmp = y + x;
} else if ((t <= -6.6e-274) || (!(t <= -9.5e-296) && (t <= 2.35e-169))) {
tmp = (z * y) / a;
} else {
tmp = y + 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 (t <= (-4.7d-212)) then
tmp = y + x
else if ((t <= (-6.6d-274)) .or. (.not. (t <= (-9.5d-296))) .and. (t <= 2.35d-169)) then
tmp = (z * y) / a
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.7e-212) {
tmp = y + x;
} else if ((t <= -6.6e-274) || (!(t <= -9.5e-296) && (t <= 2.35e-169))) {
tmp = (z * y) / a;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.7e-212: tmp = y + x elif (t <= -6.6e-274) or (not (t <= -9.5e-296) and (t <= 2.35e-169)): tmp = (z * y) / a else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.7e-212) tmp = Float64(y + x); elseif ((t <= -6.6e-274) || (!(t <= -9.5e-296) && (t <= 2.35e-169))) tmp = Float64(Float64(z * y) / a); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.7e-212) tmp = y + x; elseif ((t <= -6.6e-274) || (~((t <= -9.5e-296)) && (t <= 2.35e-169))) tmp = (z * y) / a; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.7e-212], N[(y + x), $MachinePrecision], If[Or[LessEqual[t, -6.6e-274], And[N[Not[LessEqual[t, -9.5e-296]], $MachinePrecision], LessEqual[t, 2.35e-169]]], N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.7 \cdot 10^{-212}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq -6.6 \cdot 10^{-274} \lor \neg \left(t \leq -9.5 \cdot 10^{-296}\right) \land t \leq 2.35 \cdot 10^{-169}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -4.69999999999999998e-212 or -6.5999999999999996e-274 < t < -9.50000000000000046e-296 or 2.34999999999999995e-169 < t Initial program 81.7%
Taylor expanded in t around inf 73.6%
+-commutative73.6%
Simplified73.6%
if -4.69999999999999998e-212 < t < -6.5999999999999996e-274 or -9.50000000000000046e-296 < t < 2.34999999999999995e-169Initial program 99.8%
Taylor expanded in t around 0 86.9%
Taylor expanded in x around 0 71.2%
Final simplification73.3%
(FPCore (x y z t a)
:precision binary64
(if (<= t -8.6e+60)
(+ y x)
(if (<= t -4.6e-65)
(- x (* z (/ y t)))
(if (<= t 8.6e-14) (+ x (/ y (/ a z))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8.6e+60) {
tmp = y + x;
} else if (t <= -4.6e-65) {
tmp = x - (z * (y / t));
} else if (t <= 8.6e-14) {
tmp = x + (y / (a / z));
} else {
tmp = y + 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 (t <= (-8.6d+60)) then
tmp = y + x
else if (t <= (-4.6d-65)) then
tmp = x - (z * (y / t))
else if (t <= 8.6d-14) then
tmp = x + (y / (a / z))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8.6e+60) {
tmp = y + x;
} else if (t <= -4.6e-65) {
tmp = x - (z * (y / t));
} else if (t <= 8.6e-14) {
tmp = x + (y / (a / z));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -8.6e+60: tmp = y + x elif t <= -4.6e-65: tmp = x - (z * (y / t)) elif t <= 8.6e-14: tmp = x + (y / (a / z)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -8.6e+60) tmp = Float64(y + x); elseif (t <= -4.6e-65) tmp = Float64(x - Float64(z * Float64(y / t))); elseif (t <= 8.6e-14) tmp = Float64(x + Float64(y / Float64(a / z))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -8.6e+60) tmp = y + x; elseif (t <= -4.6e-65) tmp = x - (z * (y / t)); elseif (t <= 8.6e-14) tmp = x + (y / (a / z)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8.6e+60], N[(y + x), $MachinePrecision], If[LessEqual[t, -4.6e-65], N[(x - N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.6e-14], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.6 \cdot 10^{+60}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq -4.6 \cdot 10^{-65}:\\
\;\;\;\;x - z \cdot \frac{y}{t}\\
\mathbf{elif}\;t \leq 8.6 \cdot 10^{-14}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -8.59999999999999942e60 or 8.59999999999999996e-14 < t Initial program 74.4%
Taylor expanded in t around inf 84.2%
+-commutative84.2%
Simplified84.2%
if -8.59999999999999942e60 < t < -4.5999999999999999e-65Initial program 96.7%
Taylor expanded in z around inf 83.8%
Taylor expanded in a around 0 78.4%
mul-1-neg78.4%
unsub-neg78.4%
associate-*l/78.3%
*-commutative78.3%
Simplified78.3%
if -4.5999999999999999e-65 < t < 8.59999999999999996e-14Initial program 93.9%
Taylor expanded in t around 0 78.1%
+-commutative78.1%
associate-/l*82.8%
Simplified82.8%
Final simplification83.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -8e+59)
(+ y x)
(if (<= t -1.5e-68)
(- x (/ (* z y) t))
(if (<= t 2.2e-15) (+ x (/ y (/ a z))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8e+59) {
tmp = y + x;
} else if (t <= -1.5e-68) {
tmp = x - ((z * y) / t);
} else if (t <= 2.2e-15) {
tmp = x + (y / (a / z));
} else {
tmp = y + 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 (t <= (-8d+59)) then
tmp = y + x
else if (t <= (-1.5d-68)) then
tmp = x - ((z * y) / t)
else if (t <= 2.2d-15) then
tmp = x + (y / (a / z))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8e+59) {
tmp = y + x;
} else if (t <= -1.5e-68) {
tmp = x - ((z * y) / t);
} else if (t <= 2.2e-15) {
tmp = x + (y / (a / z));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -8e+59: tmp = y + x elif t <= -1.5e-68: tmp = x - ((z * y) / t) elif t <= 2.2e-15: tmp = x + (y / (a / z)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -8e+59) tmp = Float64(y + x); elseif (t <= -1.5e-68) tmp = Float64(x - Float64(Float64(z * y) / t)); elseif (t <= 2.2e-15) tmp = Float64(x + Float64(y / Float64(a / z))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -8e+59) tmp = y + x; elseif (t <= -1.5e-68) tmp = x - ((z * y) / t); elseif (t <= 2.2e-15) tmp = x + (y / (a / z)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8e+59], N[(y + x), $MachinePrecision], If[LessEqual[t, -1.5e-68], N[(x - N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e-15], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{+59}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq -1.5 \cdot 10^{-68}:\\
\;\;\;\;x - \frac{z \cdot y}{t}\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-15}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -7.99999999999999977e59 or 2.19999999999999986e-15 < t Initial program 74.4%
Taylor expanded in t around inf 84.2%
+-commutative84.2%
Simplified84.2%
if -7.99999999999999977e59 < t < -1.5e-68Initial program 96.7%
Taylor expanded in a around 0 86.4%
mul-1-neg86.4%
unsub-neg86.4%
associate-/l*89.5%
Simplified89.5%
Taylor expanded in t around 0 78.4%
if -1.5e-68 < t < 2.19999999999999986e-15Initial program 93.9%
Taylor expanded in t around 0 78.1%
+-commutative78.1%
associate-/l*82.8%
Simplified82.8%
Final simplification83.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -6.8e-45) (not (<= y 1.55e+68))) (* (/ (- z t) (- a t)) y) (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -6.8e-45) || !(y <= 1.55e+68)) {
tmp = ((z - t) / (a - t)) * y;
} else {
tmp = y + 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 ((y <= (-6.8d-45)) .or. (.not. (y <= 1.55d+68))) then
tmp = ((z - t) / (a - t)) * y
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -6.8e-45) || !(y <= 1.55e+68)) {
tmp = ((z - t) / (a - t)) * y;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -6.8e-45) or not (y <= 1.55e+68): tmp = ((z - t) / (a - t)) * y else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -6.8e-45) || !(y <= 1.55e+68)) tmp = Float64(Float64(Float64(z - t) / Float64(a - t)) * y); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -6.8e-45) || ~((y <= 1.55e+68))) tmp = ((z - t) / (a - t)) * y; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -6.8e-45], N[Not[LessEqual[y, 1.55e+68]], $MachinePrecision]], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{-45} \lor \neg \left(y \leq 1.55 \cdot 10^{+68}\right):\\
\;\;\;\;\frac{z - t}{a - t} \cdot y\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if y < -6.80000000000000008e-45 or 1.5499999999999999e68 < y Initial program 67.8%
associate-*l/96.8%
Applied egg-rr96.8%
Taylor expanded in y around inf 79.9%
div-sub79.9%
Simplified79.9%
if -6.80000000000000008e-45 < y < 1.5499999999999999e68Initial program 99.2%
Taylor expanded in t around inf 83.9%
+-commutative83.9%
Simplified83.9%
Final simplification82.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -9e+59) (not (<= t 4.4e-47))) (- x (* y (/ t (- a t)))) (+ x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -9e+59) || !(t <= 4.4e-47)) {
tmp = x - (y * (t / (a - t)));
} else {
tmp = x + (z * (y / (a - t)));
}
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 <= (-9d+59)) .or. (.not. (t <= 4.4d-47))) then
tmp = x - (y * (t / (a - t)))
else
tmp = x + (z * (y / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -9e+59) || !(t <= 4.4e-47)) {
tmp = x - (y * (t / (a - t)));
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -9e+59) or not (t <= 4.4e-47): tmp = x - (y * (t / (a - t))) else: tmp = x + (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -9e+59) || !(t <= 4.4e-47)) tmp = Float64(x - Float64(y * Float64(t / Float64(a - t)))); else tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -9e+59) || ~((t <= 4.4e-47))) tmp = x - (y * (t / (a - t))); else tmp = x + (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -9e+59], N[Not[LessEqual[t, 4.4e-47]], $MachinePrecision]], N[(x - N[(y * N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{+59} \lor \neg \left(t \leq 4.4 \cdot 10^{-47}\right):\\
\;\;\;\;x - y \cdot \frac{t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if t < -8.99999999999999919e59 or 4.40000000000000037e-47 < t Initial program 75.2%
Taylor expanded in z around 0 70.9%
mul-1-neg70.9%
associate-*l/91.0%
unsub-neg91.0%
*-commutative91.0%
Simplified91.0%
if -8.99999999999999919e59 < t < 4.40000000000000037e-47Initial program 94.4%
Taylor expanded in z around inf 85.2%
associate-*l/87.2%
*-commutative87.2%
Simplified87.2%
Final simplification89.2%
(FPCore (x y z t a) :precision binary64 (if (<= t -4.9e-49) (- x (/ y (/ t (- z t)))) (if (<= t 4.7e-47) (+ x (* z (/ y (- a t)))) (- x (* y (/ t (- a t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.9e-49) {
tmp = x - (y / (t / (z - t)));
} else if (t <= 4.7e-47) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = x - (y * (t / (a - t)));
}
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 <= (-4.9d-49)) then
tmp = x - (y / (t / (z - t)))
else if (t <= 4.7d-47) then
tmp = x + (z * (y / (a - t)))
else
tmp = x - (y * (t / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.9e-49) {
tmp = x - (y / (t / (z - t)));
} else if (t <= 4.7e-47) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = x - (y * (t / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.9e-49: tmp = x - (y / (t / (z - t))) elif t <= 4.7e-47: tmp = x + (z * (y / (a - t))) else: tmp = x - (y * (t / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.9e-49) tmp = Float64(x - Float64(y / Float64(t / Float64(z - t)))); elseif (t <= 4.7e-47) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); else tmp = Float64(x - Float64(y * Float64(t / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.9e-49) tmp = x - (y / (t / (z - t))); elseif (t <= 4.7e-47) tmp = x + (z * (y / (a - t))); else tmp = x - (y * (t / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.9e-49], N[(x - N[(y / N[(t / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.7e-47], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.9 \cdot 10^{-49}:\\
\;\;\;\;x - \frac{y}{\frac{t}{z - t}}\\
\mathbf{elif}\;t \leq 4.7 \cdot 10^{-47}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{t}{a - t}\\
\end{array}
\end{array}
if t < -4.9000000000000002e-49Initial program 73.2%
Taylor expanded in a around 0 68.1%
mul-1-neg68.1%
unsub-neg68.1%
associate-/l*91.4%
Simplified91.4%
if -4.9000000000000002e-49 < t < 4.70000000000000024e-47Initial program 93.9%
Taylor expanded in z around inf 86.2%
associate-*l/88.8%
*-commutative88.8%
Simplified88.8%
if 4.70000000000000024e-47 < t Initial program 83.4%
Taylor expanded in z around 0 80.0%
mul-1-neg80.0%
associate-*l/92.9%
unsub-neg92.9%
*-commutative92.9%
Simplified92.9%
Final simplification90.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3.8e+91) (not (<= y 7.5e+124))) (* y (- 1.0 (/ z t))) (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.8e+91) || !(y <= 7.5e+124)) {
tmp = y * (1.0 - (z / t));
} else {
tmp = y + 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 ((y <= (-3.8d+91)) .or. (.not. (y <= 7.5d+124))) then
tmp = y * (1.0d0 - (z / t))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.8e+91) || !(y <= 7.5e+124)) {
tmp = y * (1.0 - (z / t));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3.8e+91) or not (y <= 7.5e+124): tmp = y * (1.0 - (z / t)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3.8e+91) || !(y <= 7.5e+124)) tmp = Float64(y * Float64(1.0 - Float64(z / t))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -3.8e+91) || ~((y <= 7.5e+124))) tmp = y * (1.0 - (z / t)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.8e+91], N[Not[LessEqual[y, 7.5e+124]], $MachinePrecision]], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+91} \lor \neg \left(y \leq 7.5 \cdot 10^{+124}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if y < -3.7999999999999998e91 or 7.50000000000000038e124 < y Initial program 61.8%
Taylor expanded in a around 0 41.3%
mul-1-neg41.3%
unsub-neg41.3%
associate-/l*67.9%
Simplified67.9%
Taylor expanded in y around inf 60.0%
if -3.7999999999999998e91 < y < 7.50000000000000038e124Initial program 94.4%
Taylor expanded in t around inf 77.9%
+-commutative77.9%
Simplified77.9%
Final simplification72.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.5e-50) (not (<= t 2.5e-11))) (+ y x) (+ x (/ y (/ a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.5e-50) || !(t <= 2.5e-11)) {
tmp = y + x;
} else {
tmp = x + (y / (a / z));
}
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 <= (-3.5d-50)) .or. (.not. (t <= 2.5d-11))) then
tmp = y + x
else
tmp = x + (y / (a / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.5e-50) || !(t <= 2.5e-11)) {
tmp = y + x;
} else {
tmp = x + (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.5e-50) or not (t <= 2.5e-11): tmp = y + x else: tmp = x + (y / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.5e-50) || !(t <= 2.5e-11)) tmp = Float64(y + x); else tmp = Float64(x + Float64(y / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.5e-50) || ~((t <= 2.5e-11))) tmp = y + x; else tmp = x + (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.5e-50], N[Not[LessEqual[t, 2.5e-11]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.5 \cdot 10^{-50} \lor \neg \left(t \leq 2.5 \cdot 10^{-11}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if t < -3.49999999999999997e-50 or 2.50000000000000009e-11 < t Initial program 77.7%
Taylor expanded in t around inf 81.1%
+-commutative81.1%
Simplified81.1%
if -3.49999999999999997e-50 < t < 2.50000000000000009e-11Initial program 94.2%
Taylor expanded in t around 0 77.0%
+-commutative77.0%
associate-/l*81.5%
Simplified81.5%
Final simplification81.2%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.1e-50) (+ y x) (if (<= t 2.8e-13) (+ x (/ (* z y) a)) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.1e-50) {
tmp = y + x;
} else if (t <= 2.8e-13) {
tmp = x + ((z * y) / a);
} else {
tmp = y + 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 (t <= (-1.1d-50)) then
tmp = y + x
else if (t <= 2.8d-13) then
tmp = x + ((z * y) / a)
else
tmp = y + x
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.1e-50) {
tmp = y + x;
} else if (t <= 2.8e-13) {
tmp = x + ((z * y) / a);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.1e-50: tmp = y + x elif t <= 2.8e-13: tmp = x + ((z * y) / a) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.1e-50) tmp = Float64(y + x); elseif (t <= 2.8e-13) tmp = Float64(x + Float64(Float64(z * y) / a)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.1e-50) tmp = y + x; elseif (t <= 2.8e-13) tmp = x + ((z * y) / a); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.1e-50], N[(y + x), $MachinePrecision], If[LessEqual[t, 2.8e-13], N[(x + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{-50}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-13}:\\
\;\;\;\;x + \frac{z \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -1.0999999999999999e-50 or 2.8000000000000002e-13 < t Initial program 77.7%
Taylor expanded in t around inf 81.1%
+-commutative81.1%
Simplified81.1%
if -1.0999999999999999e-50 < t < 2.8000000000000002e-13Initial program 94.2%
Taylor expanded in t around 0 77.0%
Final simplification79.5%
(FPCore (x y z t a) :precision binary64 (if (<= t -5.5e-53) (+ y x) (if (<= t 5e-12) (+ x (* z (/ y a))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.5e-53) {
tmp = y + x;
} else if (t <= 5e-12) {
tmp = x + (z * (y / a));
} else {
tmp = y + 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 (t <= (-5.5d-53)) then
tmp = y + x
else if (t <= 5d-12) then
tmp = x + (z * (y / a))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.5e-53) {
tmp = y + x;
} else if (t <= 5e-12) {
tmp = x + (z * (y / a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.5e-53: tmp = y + x elif t <= 5e-12: tmp = x + (z * (y / a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.5e-53) tmp = Float64(y + x); elseif (t <= 5e-12) tmp = Float64(x + Float64(z * Float64(y / a))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.5e-53) tmp = y + x; elseif (t <= 5e-12) tmp = x + (z * (y / a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.5e-53], N[(y + x), $MachinePrecision], If[LessEqual[t, 5e-12], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{-53}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-12}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -5.50000000000000023e-53 or 4.9999999999999997e-12 < t Initial program 77.7%
Taylor expanded in t around inf 81.1%
+-commutative81.1%
Simplified81.1%
if -5.50000000000000023e-53 < t < 4.9999999999999997e-12Initial program 94.2%
Taylor expanded in t around 0 77.0%
+-commutative77.0%
associate-/l*81.5%
Simplified81.5%
associate-/r/79.5%
Applied egg-rr79.5%
Final simplification80.5%
(FPCore (x y z t a) :precision binary64 (+ x (* (- z t) (/ y (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (a - 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 + ((z - t) * (y / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (a - t)));
}
def code(x, y, z, t, a): return x + ((z - t) * (y / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) * (y / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(z - t\right) \cdot \frac{y}{a - t}
\end{array}
Initial program 84.1%
associate-*l/96.3%
Applied egg-rr96.3%
Final simplification96.3%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.8e-132) (+ y x) (if (<= t 1.35e-174) (* y (/ z a)) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.8e-132) {
tmp = y + x;
} else if (t <= 1.35e-174) {
tmp = y * (z / a);
} else {
tmp = y + 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 (t <= (-3.8d-132)) then
tmp = y + x
else if (t <= 1.35d-174) then
tmp = y * (z / a)
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.8e-132) {
tmp = y + x;
} else if (t <= 1.35e-174) {
tmp = y * (z / a);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.8e-132: tmp = y + x elif t <= 1.35e-174: tmp = y * (z / a) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.8e-132) tmp = Float64(y + x); elseif (t <= 1.35e-174) tmp = Float64(y * Float64(z / a)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.8e-132) tmp = y + x; elseif (t <= 1.35e-174) tmp = y * (z / a); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.8e-132], N[(y + x), $MachinePrecision], If[LessEqual[t, 1.35e-174], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{-132}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-174}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -3.7999999999999997e-132 or 1.34999999999999994e-174 < t Initial program 81.6%
Taylor expanded in t around inf 74.8%
+-commutative74.8%
Simplified74.8%
if -3.7999999999999997e-132 < t < 1.34999999999999994e-174Initial program 94.2%
Taylor expanded in t around 0 83.7%
Taylor expanded in x around 0 56.2%
associate-*r/58.1%
Simplified58.1%
Final simplification71.5%
(FPCore (x y z t a) :precision binary64 (if (<= x -9.6e-140) x (if (<= x 9.5e-36) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -9.6e-140) {
tmp = x;
} else if (x <= 9.5e-36) {
tmp = 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 (x <= (-9.6d-140)) then
tmp = x
else if (x <= 9.5d-36) then
tmp = 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 (x <= -9.6e-140) {
tmp = x;
} else if (x <= 9.5e-36) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -9.6e-140: tmp = x elif x <= 9.5e-36: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -9.6e-140) tmp = x; elseif (x <= 9.5e-36) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -9.6e-140) tmp = x; elseif (x <= 9.5e-36) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -9.6e-140], x, If[LessEqual[x, 9.5e-36], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.6 \cdot 10^{-140}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{-36}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -9.59999999999999947e-140 or 9.5000000000000003e-36 < x Initial program 84.4%
Taylor expanded in x around inf 67.4%
if -9.59999999999999947e-140 < x < 9.5000000000000003e-36Initial program 83.4%
Taylor expanded in a around 0 54.5%
mul-1-neg54.5%
unsub-neg54.5%
associate-/l*66.6%
Simplified66.6%
Taylor expanded in y around inf 61.2%
Taylor expanded in z around 0 39.4%
Final simplification57.9%
(FPCore (x y z t a) :precision binary64 (+ y x))
double code(double x, double y, double z, double t, double a) {
return y + 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 = y + x
end function
public static double code(double x, double y, double z, double t, double a) {
return y + x;
}
def code(x, y, z, t, a): return y + x
function code(x, y, z, t, a) return Float64(y + x) end
function tmp = code(x, y, z, t, a) tmp = y + x; end
code[x_, y_, z_, t_, a_] := N[(y + x), $MachinePrecision]
\begin{array}{l}
\\
y + x
\end{array}
Initial program 84.1%
Taylor expanded in t around inf 66.1%
+-commutative66.1%
Simplified66.1%
Final simplification66.1%
(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.1%
Taylor expanded in x around inf 48.8%
Final simplification48.8%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- a t) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (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 / ((a - t) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((a - t) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((a - t) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{a - t}{z - t}}
\end{array}
herbie shell --seed 2023283
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))