
(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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
(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}
Initial program 98.8%
clear-num98.7%
un-div-inv98.8%
Applied egg-rr98.8%
Final simplification98.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z a)))) (t_2 (/ (- z t) (- a t))))
(if (<= t_2 -1e+134)
(* y (/ z (- a t)))
(if (<= t_2 -5e-26)
t_1
(if (<= t_2 5e-127)
(- x (* y (/ t a)))
(if (<= t_2 0.05)
t_1
(if (<= t_2 2e+20) (+ x y) (- x (* z (/ y t))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / a));
double t_2 = (z - t) / (a - t);
double tmp;
if (t_2 <= -1e+134) {
tmp = y * (z / (a - t));
} else if (t_2 <= -5e-26) {
tmp = t_1;
} else if (t_2 <= 5e-127) {
tmp = x - (y * (t / a));
} else if (t_2 <= 0.05) {
tmp = t_1;
} else if (t_2 <= 2e+20) {
tmp = x + y;
} else {
tmp = x - (z * (y / 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y * (z / a))
t_2 = (z - t) / (a - t)
if (t_2 <= (-1d+134)) then
tmp = y * (z / (a - t))
else if (t_2 <= (-5d-26)) then
tmp = t_1
else if (t_2 <= 5d-127) then
tmp = x - (y * (t / a))
else if (t_2 <= 0.05d0) then
tmp = t_1
else if (t_2 <= 2d+20) then
tmp = x + y
else
tmp = x - (z * (y / t))
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));
double t_2 = (z - t) / (a - t);
double tmp;
if (t_2 <= -1e+134) {
tmp = y * (z / (a - t));
} else if (t_2 <= -5e-26) {
tmp = t_1;
} else if (t_2 <= 5e-127) {
tmp = x - (y * (t / a));
} else if (t_2 <= 0.05) {
tmp = t_1;
} else if (t_2 <= 2e+20) {
tmp = x + y;
} else {
tmp = x - (z * (y / t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / a)) t_2 = (z - t) / (a - t) tmp = 0 if t_2 <= -1e+134: tmp = y * (z / (a - t)) elif t_2 <= -5e-26: tmp = t_1 elif t_2 <= 5e-127: tmp = x - (y * (t / a)) elif t_2 <= 0.05: tmp = t_1 elif t_2 <= 2e+20: tmp = x + y else: tmp = x - (z * (y / t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / a))) t_2 = Float64(Float64(z - t) / Float64(a - t)) tmp = 0.0 if (t_2 <= -1e+134) tmp = Float64(y * Float64(z / Float64(a - t))); elseif (t_2 <= -5e-26) tmp = t_1; elseif (t_2 <= 5e-127) tmp = Float64(x - Float64(y * Float64(t / a))); elseif (t_2 <= 0.05) tmp = t_1; elseif (t_2 <= 2e+20) tmp = Float64(x + y); else tmp = Float64(x - Float64(z * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / a)); t_2 = (z - t) / (a - t); tmp = 0.0; if (t_2 <= -1e+134) tmp = y * (z / (a - t)); elseif (t_2 <= -5e-26) tmp = t_1; elseif (t_2 <= 5e-127) tmp = x - (y * (t / a)); elseif (t_2 <= 0.05) tmp = t_1; elseif (t_2 <= 2e+20) tmp = x + y; else tmp = x - (z * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+134], N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -5e-26], t$95$1, If[LessEqual[t$95$2, 5e-127], N[(x - N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 0.05], t$95$1, If[LessEqual[t$95$2, 2e+20], N[(x + y), $MachinePrecision], N[(x - N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{a}\\
t_2 := \frac{z - t}{a - t}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+134}:\\
\;\;\;\;y \cdot \frac{z}{a - t}\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-127}:\\
\;\;\;\;x - y \cdot \frac{t}{a}\\
\mathbf{elif}\;t\_2 \leq 0.05:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+20}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \frac{y}{t}\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 a t)) < -9.99999999999999921e133Initial program 94.5%
Taylor expanded in y around inf 89.1%
associate--l+89.1%
div-sub89.1%
Simplified89.1%
Taylor expanded in z around inf 83.8%
if -9.99999999999999921e133 < (/.f64 (-.f64 z t) (-.f64 a t)) < -5.00000000000000019e-26 or 4.9999999999999997e-127 < (/.f64 (-.f64 z t) (-.f64 a t)) < 0.050000000000000003Initial program 99.7%
Taylor expanded in t around 0 66.8%
+-commutative66.8%
associate-/l*77.2%
Simplified77.2%
if -5.00000000000000019e-26 < (/.f64 (-.f64 z t) (-.f64 a t)) < 4.9999999999999997e-127Initial program 99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 91.1%
mul-1-neg91.1%
unsub-neg91.1%
associate-/l*94.5%
Simplified94.5%
Taylor expanded in t around 0 91.1%
*-commutative91.1%
associate-/l*94.7%
Simplified94.7%
if 0.050000000000000003 < (/.f64 (-.f64 z t) (-.f64 a t)) < 2e20Initial program 100.0%
Taylor expanded in t around inf 94.4%
+-commutative94.4%
Simplified94.4%
if 2e20 < (/.f64 (-.f64 z t) (-.f64 a t)) Initial program 95.5%
Taylor expanded in z around inf 91.1%
Taylor expanded in a around 0 71.4%
mul-1-neg71.4%
unsub-neg71.4%
associate-/l*73.6%
Simplified73.6%
Taylor expanded in y around 0 71.4%
*-rgt-identity71.4%
times-frac73.8%
/-rgt-identity73.8%
associate-/r/73.6%
Simplified73.6%
associate-/r/73.8%
Applied egg-rr73.8%
Final simplification86.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- z t) (- a t))) (t_2 (+ x (* z (/ y (- a t))))))
(if (<= t_1 -5e-26)
t_2
(if (<= t_1 5e-127)
(- x (* y (/ t a)))
(if (<= t_1 0.05) (+ x (* y (/ z a))) (if (<= t_1 2.0) (+ x y) t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (a - t);
double t_2 = x + (z * (y / (a - t)));
double tmp;
if (t_1 <= -5e-26) {
tmp = t_2;
} else if (t_1 <= 5e-127) {
tmp = x - (y * (t / a));
} else if (t_1 <= 0.05) {
tmp = x + (y * (z / a));
} else if (t_1 <= 2.0) {
tmp = x + y;
} 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)
t_2 = x + (z * (y / (a - t)))
if (t_1 <= (-5d-26)) then
tmp = t_2
else if (t_1 <= 5d-127) then
tmp = x - (y * (t / a))
else if (t_1 <= 0.05d0) then
tmp = x + (y * (z / a))
else if (t_1 <= 2.0d0) then
tmp = x + y
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 - t);
double t_2 = x + (z * (y / (a - t)));
double tmp;
if (t_1 <= -5e-26) {
tmp = t_2;
} else if (t_1 <= 5e-127) {
tmp = x - (y * (t / a));
} else if (t_1 <= 0.05) {
tmp = x + (y * (z / a));
} else if (t_1 <= 2.0) {
tmp = x + y;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) / (a - t) t_2 = x + (z * (y / (a - t))) tmp = 0 if t_1 <= -5e-26: tmp = t_2 elif t_1 <= 5e-127: tmp = x - (y * (t / a)) elif t_1 <= 0.05: tmp = x + (y * (z / a)) elif t_1 <= 2.0: tmp = x + y else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(a - t)) t_2 = Float64(x + Float64(z * Float64(y / Float64(a - t)))) tmp = 0.0 if (t_1 <= -5e-26) tmp = t_2; elseif (t_1 <= 5e-127) tmp = Float64(x - Float64(y * Float64(t / a))); elseif (t_1 <= 0.05) tmp = Float64(x + Float64(y * Float64(z / a))); elseif (t_1 <= 2.0) tmp = Float64(x + y); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) / (a - t); t_2 = x + (z * (y / (a - t))); tmp = 0.0; if (t_1 <= -5e-26) tmp = t_2; elseif (t_1 <= 5e-127) tmp = x - (y * (t / a)); elseif (t_1 <= 0.05) tmp = x + (y * (z / a)); elseif (t_1 <= 2.0) tmp = x + y; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-26], t$95$2, If[LessEqual[t$95$1, 5e-127], N[(x - N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.05], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2.0], N[(x + y), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
t_2 := x + z \cdot \frac{y}{a - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-26}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-127}:\\
\;\;\;\;x - y \cdot \frac{t}{a}\\
\mathbf{elif}\;t\_1 \leq 0.05:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{elif}\;t\_1 \leq 2:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 a t)) < -5.00000000000000019e-26 or 2 < (/.f64 (-.f64 z t) (-.f64 a t)) Initial program 97.0%
Taylor expanded in z around inf 86.0%
div-inv85.9%
*-commutative85.9%
associate-*l*97.4%
div-inv97.5%
Applied egg-rr97.5%
if -5.00000000000000019e-26 < (/.f64 (-.f64 z t) (-.f64 a t)) < 4.9999999999999997e-127Initial program 99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 91.1%
mul-1-neg91.1%
unsub-neg91.1%
associate-/l*94.5%
Simplified94.5%
Taylor expanded in t around 0 91.1%
*-commutative91.1%
associate-/l*94.7%
Simplified94.7%
if 4.9999999999999997e-127 < (/.f64 (-.f64 z t) (-.f64 a t)) < 0.050000000000000003Initial program 99.6%
Taylor expanded in t around 0 82.0%
+-commutative82.0%
associate-/l*86.4%
Simplified86.4%
if 0.050000000000000003 < (/.f64 (-.f64 z t) (-.f64 a t)) < 2Initial program 100.0%
Taylor expanded in t around inf 96.2%
+-commutative96.2%
Simplified96.2%
Final simplification95.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- z t) (- a t))))
(if (<= t_1 -5e-26)
(+ x (/ y (/ (- a t) z)))
(if (<= t_1 5e-127)
(- x (* y (/ t a)))
(if (<= t_1 0.05)
(+ x (* y (/ z a)))
(if (<= t_1 2.0) (+ x y) (+ x (* z (/ y (- a t))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (a - t);
double tmp;
if (t_1 <= -5e-26) {
tmp = x + (y / ((a - t) / z));
} else if (t_1 <= 5e-127) {
tmp = x - (y * (t / a));
} else if (t_1 <= 0.05) {
tmp = x + (y * (z / a));
} else if (t_1 <= 2.0) {
tmp = x + y;
} 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) :: t_1
real(8) :: tmp
t_1 = (z - t) / (a - t)
if (t_1 <= (-5d-26)) then
tmp = x + (y / ((a - t) / z))
else if (t_1 <= 5d-127) then
tmp = x - (y * (t / a))
else if (t_1 <= 0.05d0) then
tmp = x + (y * (z / a))
else if (t_1 <= 2.0d0) then
tmp = x + y
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 t_1 = (z - t) / (a - t);
double tmp;
if (t_1 <= -5e-26) {
tmp = x + (y / ((a - t) / z));
} else if (t_1 <= 5e-127) {
tmp = x - (y * (t / a));
} else if (t_1 <= 0.05) {
tmp = x + (y * (z / a));
} else if (t_1 <= 2.0) {
tmp = x + y;
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) / (a - t) tmp = 0 if t_1 <= -5e-26: tmp = x + (y / ((a - t) / z)) elif t_1 <= 5e-127: tmp = x - (y * (t / a)) elif t_1 <= 0.05: tmp = x + (y * (z / a)) elif t_1 <= 2.0: tmp = x + y else: tmp = x + (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(a - t)) tmp = 0.0 if (t_1 <= -5e-26) tmp = Float64(x + Float64(y / Float64(Float64(a - t) / z))); elseif (t_1 <= 5e-127) tmp = Float64(x - Float64(y * Float64(t / a))); elseif (t_1 <= 0.05) tmp = Float64(x + Float64(y * Float64(z / a))); elseif (t_1 <= 2.0) tmp = Float64(x + y); else tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) / (a - t); tmp = 0.0; if (t_1 <= -5e-26) tmp = x + (y / ((a - t) / z)); elseif (t_1 <= 5e-127) tmp = x - (y * (t / a)); elseif (t_1 <= 0.05) tmp = x + (y * (z / a)); elseif (t_1 <= 2.0) tmp = x + y; else tmp = x + (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-26], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-127], N[(x - N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.05], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2.0], N[(x + y), $MachinePrecision], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-26}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-127}:\\
\;\;\;\;x - y \cdot \frac{t}{a}\\
\mathbf{elif}\;t\_1 \leq 0.05:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{elif}\;t\_1 \leq 2:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 a t)) < -5.00000000000000019e-26Initial program 97.9%
clear-num97.9%
un-div-inv98.2%
Applied egg-rr98.2%
Taylor expanded in z around inf 98.2%
if -5.00000000000000019e-26 < (/.f64 (-.f64 z t) (-.f64 a t)) < 4.9999999999999997e-127Initial program 99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 91.1%
mul-1-neg91.1%
unsub-neg91.1%
associate-/l*94.5%
Simplified94.5%
Taylor expanded in t around 0 91.1%
*-commutative91.1%
associate-/l*94.7%
Simplified94.7%
if 4.9999999999999997e-127 < (/.f64 (-.f64 z t) (-.f64 a t)) < 0.050000000000000003Initial program 99.6%
Taylor expanded in t around 0 82.0%
+-commutative82.0%
associate-/l*86.4%
Simplified86.4%
if 0.050000000000000003 < (/.f64 (-.f64 z t) (-.f64 a t)) < 2Initial program 100.0%
Taylor expanded in t around inf 96.2%
+-commutative96.2%
Simplified96.2%
if 2 < (/.f64 (-.f64 z t) (-.f64 a t)) Initial program 96.2%
Taylor expanded in z around inf 88.6%
div-inv88.5%
*-commutative88.5%
associate-*l*97.0%
div-inv97.2%
Applied egg-rr97.2%
Final simplification95.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- z t) (- a t))))
(if (<= t_1 -5e-26)
(+ x (/ z (/ (- a t) y)))
(if (<= t_1 5e-127)
(- x (* y (/ t a)))
(if (<= t_1 0.05)
(+ x (* y (/ z a)))
(if (<= t_1 2.0) (+ x y) (+ x (* z (/ y (- a t))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (a - t);
double tmp;
if (t_1 <= -5e-26) {
tmp = x + (z / ((a - t) / y));
} else if (t_1 <= 5e-127) {
tmp = x - (y * (t / a));
} else if (t_1 <= 0.05) {
tmp = x + (y * (z / a));
} else if (t_1 <= 2.0) {
tmp = x + y;
} 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) :: t_1
real(8) :: tmp
t_1 = (z - t) / (a - t)
if (t_1 <= (-5d-26)) then
tmp = x + (z / ((a - t) / y))
else if (t_1 <= 5d-127) then
tmp = x - (y * (t / a))
else if (t_1 <= 0.05d0) then
tmp = x + (y * (z / a))
else if (t_1 <= 2.0d0) then
tmp = x + y
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 t_1 = (z - t) / (a - t);
double tmp;
if (t_1 <= -5e-26) {
tmp = x + (z / ((a - t) / y));
} else if (t_1 <= 5e-127) {
tmp = x - (y * (t / a));
} else if (t_1 <= 0.05) {
tmp = x + (y * (z / a));
} else if (t_1 <= 2.0) {
tmp = x + y;
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) / (a - t) tmp = 0 if t_1 <= -5e-26: tmp = x + (z / ((a - t) / y)) elif t_1 <= 5e-127: tmp = x - (y * (t / a)) elif t_1 <= 0.05: tmp = x + (y * (z / a)) elif t_1 <= 2.0: tmp = x + y else: tmp = x + (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(a - t)) tmp = 0.0 if (t_1 <= -5e-26) tmp = Float64(x + Float64(z / Float64(Float64(a - t) / y))); elseif (t_1 <= 5e-127) tmp = Float64(x - Float64(y * Float64(t / a))); elseif (t_1 <= 0.05) tmp = Float64(x + Float64(y * Float64(z / a))); elseif (t_1 <= 2.0) tmp = Float64(x + y); else tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) / (a - t); tmp = 0.0; if (t_1 <= -5e-26) tmp = x + (z / ((a - t) / y)); elseif (t_1 <= 5e-127) tmp = x - (y * (t / a)); elseif (t_1 <= 0.05) tmp = x + (y * (z / a)); elseif (t_1 <= 2.0) tmp = x + y; else tmp = x + (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-26], N[(x + N[(z / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-127], N[(x - N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.05], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2.0], N[(x + y), $MachinePrecision], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-26}:\\
\;\;\;\;x + \frac{z}{\frac{a - t}{y}}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-127}:\\
\;\;\;\;x - y \cdot \frac{t}{a}\\
\mathbf{elif}\;t\_1 \leq 0.05:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{elif}\;t\_1 \leq 2:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 a t)) < -5.00000000000000019e-26Initial program 97.9%
Taylor expanded in z around inf 83.3%
div-inv83.2%
*-commutative83.2%
associate-*l*97.8%
div-inv97.9%
Applied egg-rr97.9%
clear-num97.9%
un-div-inv98.9%
Applied egg-rr98.9%
if -5.00000000000000019e-26 < (/.f64 (-.f64 z t) (-.f64 a t)) < 4.9999999999999997e-127Initial program 99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 91.1%
mul-1-neg91.1%
unsub-neg91.1%
associate-/l*94.5%
Simplified94.5%
Taylor expanded in t around 0 91.1%
*-commutative91.1%
associate-/l*94.7%
Simplified94.7%
if 4.9999999999999997e-127 < (/.f64 (-.f64 z t) (-.f64 a t)) < 0.050000000000000003Initial program 99.6%
Taylor expanded in t around 0 82.0%
+-commutative82.0%
associate-/l*86.4%
Simplified86.4%
if 0.050000000000000003 < (/.f64 (-.f64 z t) (-.f64 a t)) < 2Initial program 100.0%
Taylor expanded in t around inf 96.2%
+-commutative96.2%
Simplified96.2%
if 2 < (/.f64 (-.f64 z t) (-.f64 a t)) Initial program 96.2%
Taylor expanded in z around inf 88.6%
div-inv88.5%
*-commutative88.5%
associate-*l*97.0%
div-inv97.2%
Applied egg-rr97.2%
Final simplification95.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- z t) (- a t))))
(if (<= t_1 -5e-26)
(+ x (/ z (/ (- a t) y)))
(if (<= t_1 0.05)
(+ x (/ (* y (- z t)) a))
(if (<= t_1 2.0) (+ x y) (+ x (* z (/ y (- a t)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (a - t);
double tmp;
if (t_1 <= -5e-26) {
tmp = x + (z / ((a - t) / y));
} else if (t_1 <= 0.05) {
tmp = x + ((y * (z - t)) / a);
} else if (t_1 <= 2.0) {
tmp = x + y;
} 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) :: t_1
real(8) :: tmp
t_1 = (z - t) / (a - t)
if (t_1 <= (-5d-26)) then
tmp = x + (z / ((a - t) / y))
else if (t_1 <= 0.05d0) then
tmp = x + ((y * (z - t)) / a)
else if (t_1 <= 2.0d0) then
tmp = x + y
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 t_1 = (z - t) / (a - t);
double tmp;
if (t_1 <= -5e-26) {
tmp = x + (z / ((a - t) / y));
} else if (t_1 <= 0.05) {
tmp = x + ((y * (z - t)) / a);
} else if (t_1 <= 2.0) {
tmp = x + y;
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) / (a - t) tmp = 0 if t_1 <= -5e-26: tmp = x + (z / ((a - t) / y)) elif t_1 <= 0.05: tmp = x + ((y * (z - t)) / a) elif t_1 <= 2.0: tmp = x + y else: tmp = x + (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(a - t)) tmp = 0.0 if (t_1 <= -5e-26) tmp = Float64(x + Float64(z / Float64(Float64(a - t) / y))); elseif (t_1 <= 0.05) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / a)); elseif (t_1 <= 2.0) tmp = Float64(x + y); else tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) / (a - t); tmp = 0.0; if (t_1 <= -5e-26) tmp = x + (z / ((a - t) / y)); elseif (t_1 <= 0.05) tmp = x + ((y * (z - t)) / a); elseif (t_1 <= 2.0) tmp = x + y; else tmp = x + (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-26], N[(x + N[(z / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.05], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2.0], N[(x + y), $MachinePrecision], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-26}:\\
\;\;\;\;x + \frac{z}{\frac{a - t}{y}}\\
\mathbf{elif}\;t\_1 \leq 0.05:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{elif}\;t\_1 \leq 2:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 a t)) < -5.00000000000000019e-26Initial program 97.9%
Taylor expanded in z around inf 83.3%
div-inv83.2%
*-commutative83.2%
associate-*l*97.8%
div-inv97.9%
Applied egg-rr97.9%
clear-num97.9%
un-div-inv98.9%
Applied egg-rr98.9%
if -5.00000000000000019e-26 < (/.f64 (-.f64 z t) (-.f64 a t)) < 0.050000000000000003Initial program 99.9%
Taylor expanded in a around inf 93.5%
if 0.050000000000000003 < (/.f64 (-.f64 z t) (-.f64 a t)) < 2Initial program 100.0%
Taylor expanded in t around inf 96.2%
+-commutative96.2%
Simplified96.2%
if 2 < (/.f64 (-.f64 z t) (-.f64 a t)) Initial program 96.2%
Taylor expanded in z around inf 88.6%
div-inv88.5%
*-commutative88.5%
associate-*l*97.0%
div-inv97.2%
Applied egg-rr97.2%
Final simplification96.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- z t) (- a t))))
(if (<= t_1 -5e-26)
(+ x (/ z (/ (- a t) y)))
(if (<= t_1 0.4)
(+ x (/ (* y (- z t)) a))
(if (<= t_1 50000000.0)
(- x (* y (+ (/ z t) -1.0)))
(+ x (* z (/ y (- a t)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (a - t);
double tmp;
if (t_1 <= -5e-26) {
tmp = x + (z / ((a - t) / y));
} else if (t_1 <= 0.4) {
tmp = x + ((y * (z - t)) / a);
} else if (t_1 <= 50000000.0) {
tmp = x - (y * ((z / t) + -1.0));
} 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) :: t_1
real(8) :: tmp
t_1 = (z - t) / (a - t)
if (t_1 <= (-5d-26)) then
tmp = x + (z / ((a - t) / y))
else if (t_1 <= 0.4d0) then
tmp = x + ((y * (z - t)) / a)
else if (t_1 <= 50000000.0d0) then
tmp = x - (y * ((z / t) + (-1.0d0)))
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 t_1 = (z - t) / (a - t);
double tmp;
if (t_1 <= -5e-26) {
tmp = x + (z / ((a - t) / y));
} else if (t_1 <= 0.4) {
tmp = x + ((y * (z - t)) / a);
} else if (t_1 <= 50000000.0) {
tmp = x - (y * ((z / t) + -1.0));
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) / (a - t) tmp = 0 if t_1 <= -5e-26: tmp = x + (z / ((a - t) / y)) elif t_1 <= 0.4: tmp = x + ((y * (z - t)) / a) elif t_1 <= 50000000.0: tmp = x - (y * ((z / t) + -1.0)) else: tmp = x + (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(a - t)) tmp = 0.0 if (t_1 <= -5e-26) tmp = Float64(x + Float64(z / Float64(Float64(a - t) / y))); elseif (t_1 <= 0.4) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / a)); elseif (t_1 <= 50000000.0) tmp = Float64(x - Float64(y * Float64(Float64(z / t) + -1.0))); else tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) / (a - t); tmp = 0.0; if (t_1 <= -5e-26) tmp = x + (z / ((a - t) / y)); elseif (t_1 <= 0.4) tmp = x + ((y * (z - t)) / a); elseif (t_1 <= 50000000.0) tmp = x - (y * ((z / t) + -1.0)); else tmp = x + (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-26], N[(x + N[(z / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.4], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 50000000.0], N[(x - N[(y * N[(N[(z / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-26}:\\
\;\;\;\;x + \frac{z}{\frac{a - t}{y}}\\
\mathbf{elif}\;t\_1 \leq 0.4:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{elif}\;t\_1 \leq 50000000:\\
\;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 a t)) < -5.00000000000000019e-26Initial program 97.9%
Taylor expanded in z around inf 83.3%
div-inv83.2%
*-commutative83.2%
associate-*l*97.8%
div-inv97.9%
Applied egg-rr97.9%
clear-num97.9%
un-div-inv98.9%
Applied egg-rr98.9%
if -5.00000000000000019e-26 < (/.f64 (-.f64 z t) (-.f64 a t)) < 0.40000000000000002Initial program 99.9%
Taylor expanded in a around inf 93.5%
if 0.40000000000000002 < (/.f64 (-.f64 z t) (-.f64 a t)) < 5e7Initial program 100.0%
Taylor expanded in a around 0 77.4%
mul-1-neg77.4%
unsub-neg77.4%
associate-/l*98.1%
div-sub98.1%
sub-neg98.1%
*-inverses98.1%
metadata-eval98.1%
Simplified98.1%
if 5e7 < (/.f64 (-.f64 z t) (-.f64 a t)) Initial program 96.0%
Taylor expanded in z around inf 90.1%
div-inv90.0%
*-commutative90.0%
associate-*l*97.8%
div-inv97.9%
Applied egg-rr97.9%
Final simplification96.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z (- a t)))))
(if (<= a -4.7e-199)
(+ x y)
(if (<= a -6.6e-221)
t_1
(if (<= a -7.4e-253)
(+ x y)
(if (<= a 2.7e-276) t_1 (if (<= a 7e+124) (+ x y) x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / (a - t));
double tmp;
if (a <= -4.7e-199) {
tmp = x + y;
} else if (a <= -6.6e-221) {
tmp = t_1;
} else if (a <= -7.4e-253) {
tmp = x + y;
} else if (a <= 2.7e-276) {
tmp = t_1;
} else if (a <= 7e+124) {
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) :: t_1
real(8) :: tmp
t_1 = y * (z / (a - t))
if (a <= (-4.7d-199)) then
tmp = x + y
else if (a <= (-6.6d-221)) then
tmp = t_1
else if (a <= (-7.4d-253)) then
tmp = x + y
else if (a <= 2.7d-276) then
tmp = t_1
else if (a <= 7d+124) 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 t_1 = y * (z / (a - t));
double tmp;
if (a <= -4.7e-199) {
tmp = x + y;
} else if (a <= -6.6e-221) {
tmp = t_1;
} else if (a <= -7.4e-253) {
tmp = x + y;
} else if (a <= 2.7e-276) {
tmp = t_1;
} else if (a <= 7e+124) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / (a - t)) tmp = 0 if a <= -4.7e-199: tmp = x + y elif a <= -6.6e-221: tmp = t_1 elif a <= -7.4e-253: tmp = x + y elif a <= 2.7e-276: tmp = t_1 elif a <= 7e+124: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / Float64(a - t))) tmp = 0.0 if (a <= -4.7e-199) tmp = Float64(x + y); elseif (a <= -6.6e-221) tmp = t_1; elseif (a <= -7.4e-253) tmp = Float64(x + y); elseif (a <= 2.7e-276) tmp = t_1; elseif (a <= 7e+124) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z / (a - t)); tmp = 0.0; if (a <= -4.7e-199) tmp = x + y; elseif (a <= -6.6e-221) tmp = t_1; elseif (a <= -7.4e-253) tmp = x + y; elseif (a <= 2.7e-276) tmp = t_1; elseif (a <= 7e+124) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.7e-199], N[(x + y), $MachinePrecision], If[LessEqual[a, -6.6e-221], t$95$1, If[LessEqual[a, -7.4e-253], N[(x + y), $MachinePrecision], If[LessEqual[a, 2.7e-276], t$95$1, If[LessEqual[a, 7e+124], N[(x + y), $MachinePrecision], x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{a - t}\\
\mathbf{if}\;a \leq -4.7 \cdot 10^{-199}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -6.6 \cdot 10^{-221}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -7.4 \cdot 10^{-253}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{-276}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 7 \cdot 10^{+124}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.6999999999999996e-199 or -6.59999999999999979e-221 < a < -7.3999999999999995e-253 or 2.69999999999999985e-276 < a < 7.0000000000000002e124Initial program 99.4%
Taylor expanded in t around inf 65.1%
+-commutative65.1%
Simplified65.1%
if -4.6999999999999996e-199 < a < -6.59999999999999979e-221 or -7.3999999999999995e-253 < a < 2.69999999999999985e-276Initial program 92.0%
Taylor expanded in y around inf 92.0%
associate--l+92.0%
div-sub92.0%
Simplified92.0%
Taylor expanded in z around inf 73.6%
if 7.0000000000000002e124 < a Initial program 100.0%
Taylor expanded in x around inf 83.4%
Final simplification68.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.6e+45)
(+ x y)
(if (<= t -5.7e-36)
(- x (* t (/ y a)))
(if (or (<= t -1.2e-119) (not (<= t 7e+93)))
(+ x y)
(+ x (* y (/ z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.6e+45) {
tmp = x + y;
} else if (t <= -5.7e-36) {
tmp = x - (t * (y / a));
} else if ((t <= -1.2e-119) || !(t <= 7e+93)) {
tmp = x + y;
} else {
tmp = x + (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 (t <= (-2.6d+45)) then
tmp = x + y
else if (t <= (-5.7d-36)) then
tmp = x - (t * (y / a))
else if ((t <= (-1.2d-119)) .or. (.not. (t <= 7d+93))) then
tmp = x + y
else
tmp = x + (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 (t <= -2.6e+45) {
tmp = x + y;
} else if (t <= -5.7e-36) {
tmp = x - (t * (y / a));
} else if ((t <= -1.2e-119) || !(t <= 7e+93)) {
tmp = x + y;
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.6e+45: tmp = x + y elif t <= -5.7e-36: tmp = x - (t * (y / a)) elif (t <= -1.2e-119) or not (t <= 7e+93): tmp = x + y else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.6e+45) tmp = Float64(x + y); elseif (t <= -5.7e-36) tmp = Float64(x - Float64(t * Float64(y / a))); elseif ((t <= -1.2e-119) || !(t <= 7e+93)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.6e+45) tmp = x + y; elseif (t <= -5.7e-36) tmp = x - (t * (y / a)); elseif ((t <= -1.2e-119) || ~((t <= 7e+93))) tmp = x + y; else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.6e+45], N[(x + y), $MachinePrecision], If[LessEqual[t, -5.7e-36], N[(x - N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -1.2e-119], N[Not[LessEqual[t, 7e+93]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{+45}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -5.7 \cdot 10^{-36}:\\
\;\;\;\;x - t \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{-119} \lor \neg \left(t \leq 7 \cdot 10^{+93}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -2.60000000000000007e45 or -5.6999999999999999e-36 < t < -1.20000000000000004e-119 or 6.99999999999999996e93 < t Initial program 99.0%
Taylor expanded in t around inf 72.3%
+-commutative72.3%
Simplified72.3%
if -2.60000000000000007e45 < t < -5.6999999999999999e-36Initial program 99.8%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 92.7%
mul-1-neg92.7%
unsub-neg92.7%
associate-/l*92.5%
Simplified92.5%
Taylor expanded in t around 0 85.5%
associate-/l*85.4%
Simplified85.4%
if -1.20000000000000004e-119 < t < 6.99999999999999996e93Initial program 98.5%
Taylor expanded in t around 0 72.0%
+-commutative72.0%
associate-/l*76.9%
Simplified76.9%
Final simplification75.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y (/ z t)))))
(if (<= t -8e+101)
(+ x y)
(if (<= t -3.5e-137)
t_1
(if (<= t 6.8e-49)
(+ x (* y (/ z a)))
(if (<= t 1.05e+129) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (z / t));
double tmp;
if (t <= -8e+101) {
tmp = x + y;
} else if (t <= -3.5e-137) {
tmp = t_1;
} else if (t <= 6.8e-49) {
tmp = x + (y * (z / a));
} else if (t <= 1.05e+129) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x - (y * (z / t))
if (t <= (-8d+101)) then
tmp = x + y
else if (t <= (-3.5d-137)) then
tmp = t_1
else if (t <= 6.8d-49) then
tmp = x + (y * (z / a))
else if (t <= 1.05d+129) then
tmp = t_1
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 t_1 = x - (y * (z / t));
double tmp;
if (t <= -8e+101) {
tmp = x + y;
} else if (t <= -3.5e-137) {
tmp = t_1;
} else if (t <= 6.8e-49) {
tmp = x + (y * (z / a));
} else if (t <= 1.05e+129) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * (z / t)) tmp = 0 if t <= -8e+101: tmp = x + y elif t <= -3.5e-137: tmp = t_1 elif t <= 6.8e-49: tmp = x + (y * (z / a)) elif t <= 1.05e+129: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * Float64(z / t))) tmp = 0.0 if (t <= -8e+101) tmp = Float64(x + y); elseif (t <= -3.5e-137) tmp = t_1; elseif (t <= 6.8e-49) tmp = Float64(x + Float64(y * Float64(z / a))); elseif (t <= 1.05e+129) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * (z / t)); tmp = 0.0; if (t <= -8e+101) tmp = x + y; elseif (t <= -3.5e-137) tmp = t_1; elseif (t <= 6.8e-49) tmp = x + (y * (z / a)); elseif (t <= 1.05e+129) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8e+101], N[(x + y), $MachinePrecision], If[LessEqual[t, -3.5e-137], t$95$1, If[LessEqual[t, 6.8e-49], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e+129], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -8 \cdot 10^{+101}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-137}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-49}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+129}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -7.9999999999999998e101 or 1.04999999999999998e129 < t Initial program 99.9%
Taylor expanded in t around inf 81.0%
+-commutative81.0%
Simplified81.0%
if -7.9999999999999998e101 < t < -3.5000000000000001e-137 or 6.8000000000000001e-49 < t < 1.04999999999999998e129Initial program 98.8%
Taylor expanded in z around inf 81.7%
Taylor expanded in a around 0 72.2%
mul-1-neg72.2%
unsub-neg72.2%
associate-/l*73.2%
Simplified73.2%
if -3.5000000000000001e-137 < t < 6.8000000000000001e-49Initial program 97.8%
Taylor expanded in t around 0 77.6%
+-commutative77.6%
associate-/l*83.5%
Simplified83.5%
Final simplification79.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.2e-119) (not (<= t 1.8e+93))) (+ x y) (+ x (/ (* y z) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.2e-119) || !(t <= 1.8e+93)) {
tmp = x + y;
} else {
tmp = x + ((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 ((t <= (-1.2d-119)) .or. (.not. (t <= 1.8d+93))) then
tmp = x + y
else
tmp = x + ((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 ((t <= -1.2e-119) || !(t <= 1.8e+93)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.2e-119) or not (t <= 1.8e+93): tmp = x + y else: tmp = x + ((y * z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.2e-119) || !(t <= 1.8e+93)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(y * z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.2e-119) || ~((t <= 1.8e+93))) tmp = x + y; else tmp = x + ((y * z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.2e-119], N[Not[LessEqual[t, 1.8e+93]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-119} \lor \neg \left(t \leq 1.8 \cdot 10^{+93}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\end{array}
\end{array}
if t < -1.20000000000000004e-119 or 1.8e93 < t Initial program 99.1%
Taylor expanded in t around inf 69.8%
+-commutative69.8%
Simplified69.8%
if -1.20000000000000004e-119 < t < 1.8e93Initial program 98.5%
Taylor expanded in t around 0 72.0%
Final simplification71.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.2e-119) (not (<= t 1.8e+93))) (+ x y) (+ x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.2e-119) || !(t <= 1.8e+93)) {
tmp = x + y;
} else {
tmp = x + (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 ((t <= (-1.2d-119)) .or. (.not. (t <= 1.8d+93))) then
tmp = x + y
else
tmp = x + (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 ((t <= -1.2e-119) || !(t <= 1.8e+93)) {
tmp = x + y;
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.2e-119) or not (t <= 1.8e+93): tmp = x + y else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.2e-119) || !(t <= 1.8e+93)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.2e-119) || ~((t <= 1.8e+93))) tmp = x + y; else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.2e-119], N[Not[LessEqual[t, 1.8e+93]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-119} \lor \neg \left(t \leq 1.8 \cdot 10^{+93}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -1.20000000000000004e-119 or 1.8e93 < t Initial program 99.1%
Taylor expanded in t around inf 69.8%
+-commutative69.8%
Simplified69.8%
if -1.20000000000000004e-119 < t < 1.8e93Initial program 98.5%
Taylor expanded in t around 0 72.0%
+-commutative72.0%
associate-/l*76.9%
Simplified76.9%
Final simplification73.5%
(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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
Initial program 98.8%
Final simplification98.8%
(FPCore (x y z t a) :precision binary64 (if (<= a 4.8e+126) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 4.8e+126) {
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 <= 4.8d+126) 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 <= 4.8e+126) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= 4.8e+126: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= 4.8e+126) 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 <= 4.8e+126) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, 4.8e+126], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.8 \cdot 10^{+126}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < 4.80000000000000024e126Initial program 98.6%
Taylor expanded in t around inf 60.2%
+-commutative60.2%
Simplified60.2%
if 4.80000000000000024e126 < a Initial program 100.0%
Taylor expanded in x around inf 83.4%
Final simplification63.4%
(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 98.8%
Taylor expanded in x around inf 50.3%
Final simplification50.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) (- a t))))))
(if (< y -8.508084860551241e-17)
t_1
(if (< y 2.894426862792089e-49)
(+ x (* (* y (- z t)) (/ 1.0 (- a t))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double tmp;
if (y < -8.508084860551241e-17) {
tmp = t_1;
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) * (1.0 / (a - t)));
} 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 - t) / (a - t)))
if (y < (-8.508084860551241d-17)) then
tmp = t_1
else if (y < 2.894426862792089d-49) then
tmp = x + ((y * (z - t)) * (1.0d0 / (a - t)))
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 - t) / (a - t)));
double tmp;
if (y < -8.508084860551241e-17) {
tmp = t_1;
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) * (1.0 / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / (a - t))) tmp = 0 if y < -8.508084860551241e-17: tmp = t_1 elif y < 2.894426862792089e-49: tmp = x + ((y * (z - t)) * (1.0 / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (y < -8.508084860551241e-17) tmp = t_1; elseif (y < 2.894426862792089e-49) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) * Float64(1.0 / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - t) / (a - t))); tmp = 0.0; if (y < -8.508084860551241e-17) tmp = t_1; elseif (y < 2.894426862792089e-49) tmp = x + ((y * (z - t)) * (1.0 / (a - t))); 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 - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -8.508084860551241e-17], t$95$1, If[Less[y, 2.894426862792089e-49], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y < -8.508084860551241 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024066
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"
:precision binary64
:alt
(if (< y -8.508084860551241e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.894426862792089e-49) (+ x (* (* y (- z t)) (/ 1.0 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))
(+ x (* y (/ (- z t) (- a t)))))