
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * ((z - t) / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * ((z - t) / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- z t) (- z a))) (t_2 (+ x (* t (/ y (- a z))))))
(if (<= t_1 -50000000000.0)
t_2
(if (<= t_1 0.1)
(+ x (* y (/ (- t z) a)))
(if (<= t_1 5e+43) (- x (* y (/ (- t z) z))) t_2)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (z - a);
double t_2 = x + (t * (y / (a - z)));
double tmp;
if (t_1 <= -50000000000.0) {
tmp = t_2;
} else if (t_1 <= 0.1) {
tmp = x + (y * ((t - z) / a));
} else if (t_1 <= 5e+43) {
tmp = x - (y * ((t - z) / z));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z - t) / (z - a)
t_2 = x + (t * (y / (a - z)))
if (t_1 <= (-50000000000.0d0)) then
tmp = t_2
else if (t_1 <= 0.1d0) then
tmp = x + (y * ((t - z) / a))
else if (t_1 <= 5d+43) then
tmp = x - (y * ((t - z) / z))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (z - a);
double t_2 = x + (t * (y / (a - z)));
double tmp;
if (t_1 <= -50000000000.0) {
tmp = t_2;
} else if (t_1 <= 0.1) {
tmp = x + (y * ((t - z) / a));
} else if (t_1 <= 5e+43) {
tmp = x - (y * ((t - z) / z));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) / (z - a) t_2 = x + (t * (y / (a - z))) tmp = 0 if t_1 <= -50000000000.0: tmp = t_2 elif t_1 <= 0.1: tmp = x + (y * ((t - z) / a)) elif t_1 <= 5e+43: tmp = x - (y * ((t - z) / z)) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(z - a)) t_2 = Float64(x + Float64(t * Float64(y / Float64(a - z)))) tmp = 0.0 if (t_1 <= -50000000000.0) tmp = t_2; elseif (t_1 <= 0.1) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); elseif (t_1 <= 5e+43) tmp = Float64(x - Float64(y * Float64(Float64(t - z) / z))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) / (z - a); t_2 = x + (t * (y / (a - z))); tmp = 0.0; if (t_1 <= -50000000000.0) tmp = t_2; elseif (t_1 <= 0.1) tmp = x + (y * ((t - z) / a)); elseif (t_1 <= 5e+43) tmp = x - (y * ((t - z) / z)); 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[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -50000000000.0], t$95$2, If[LessEqual[t$95$1, 0.1], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+43], N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{z - a}\\
t_2 := x + t \cdot \frac{y}{a - z}\\
\mathbf{if}\;t\_1 \leq -50000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 0.1:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+43}:\\
\;\;\;\;x - y \cdot \frac{t - z}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 z a)) < -5e10 or 5.0000000000000004e43 < (/.f64 (-.f64 z t) (-.f64 z a)) Initial program 95.1%
Taylor expanded in t around inf 91.0%
mul-1-neg91.0%
associate-/l*99.4%
Simplified99.4%
if -5e10 < (/.f64 (-.f64 z t) (-.f64 z a)) < 0.10000000000000001Initial program 99.6%
Taylor expanded in a around inf 86.4%
mul-1-neg86.4%
associate-/l*98.2%
distribute-rgt-neg-in98.2%
distribute-neg-frac298.2%
Simplified98.2%
if 0.10000000000000001 < (/.f64 (-.f64 z t) (-.f64 z a)) < 5.0000000000000004e43Initial program 100.0%
Taylor expanded in a around 0 98.4%
Final simplification98.6%
(FPCore (x y z t a) :precision binary64 (fma y (/ (- z t) (- z a)) x))
double code(double x, double y, double z, double t, double a) {
return fma(y, ((z - t) / (z - a)), x);
}
function code(x, y, z, t, a) return fma(y, Float64(Float64(z - t) / Float64(z - a)), x) end
code[x_, y_, z_, t_, a_] := N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)
\end{array}
Initial program 98.4%
+-commutative98.4%
fma-define98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- z t) (- z a))))
(if (<= t_1 -5e+17)
(- x (* t (/ y z)))
(if (<= t_1 0.1)
(+ x (* t (/ y a)))
(if (<= t_1 2.0)
(- x (* y (/ (- t z) z)))
(if (<= t_1 1e+111)
(* y t_1)
(if (<= t_1 1e+204) (- x (/ y (/ z t))) (* t (/ y (- a z))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (z - a);
double tmp;
if (t_1 <= -5e+17) {
tmp = x - (t * (y / z));
} else if (t_1 <= 0.1) {
tmp = x + (t * (y / a));
} else if (t_1 <= 2.0) {
tmp = x - (y * ((t - z) / z));
} else if (t_1 <= 1e+111) {
tmp = y * t_1;
} else if (t_1 <= 1e+204) {
tmp = x - (y / (z / t));
} else {
tmp = t * (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) :: t_1
real(8) :: tmp
t_1 = (z - t) / (z - a)
if (t_1 <= (-5d+17)) then
tmp = x - (t * (y / z))
else if (t_1 <= 0.1d0) then
tmp = x + (t * (y / a))
else if (t_1 <= 2.0d0) then
tmp = x - (y * ((t - z) / z))
else if (t_1 <= 1d+111) then
tmp = y * t_1
else if (t_1 <= 1d+204) then
tmp = x - (y / (z / t))
else
tmp = t * (y / (a - z))
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) / (z - a);
double tmp;
if (t_1 <= -5e+17) {
tmp = x - (t * (y / z));
} else if (t_1 <= 0.1) {
tmp = x + (t * (y / a));
} else if (t_1 <= 2.0) {
tmp = x - (y * ((t - z) / z));
} else if (t_1 <= 1e+111) {
tmp = y * t_1;
} else if (t_1 <= 1e+204) {
tmp = x - (y / (z / t));
} else {
tmp = t * (y / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) / (z - a) tmp = 0 if t_1 <= -5e+17: tmp = x - (t * (y / z)) elif t_1 <= 0.1: tmp = x + (t * (y / a)) elif t_1 <= 2.0: tmp = x - (y * ((t - z) / z)) elif t_1 <= 1e+111: tmp = y * t_1 elif t_1 <= 1e+204: tmp = x - (y / (z / t)) else: tmp = t * (y / (a - z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(z - a)) tmp = 0.0 if (t_1 <= -5e+17) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (t_1 <= 0.1) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (t_1 <= 2.0) tmp = Float64(x - Float64(y * Float64(Float64(t - z) / z))); elseif (t_1 <= 1e+111) tmp = Float64(y * t_1); elseif (t_1 <= 1e+204) tmp = Float64(x - Float64(y / Float64(z / t))); else tmp = Float64(t * Float64(y / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) / (z - a); tmp = 0.0; if (t_1 <= -5e+17) tmp = x - (t * (y / z)); elseif (t_1 <= 0.1) tmp = x + (t * (y / a)); elseif (t_1 <= 2.0) tmp = x - (y * ((t - z) / z)); elseif (t_1 <= 1e+111) tmp = y * t_1; elseif (t_1 <= 1e+204) tmp = x - (y / (z / t)); else tmp = t * (y / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+17], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.1], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2.0], N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+111], N[(y * t$95$1), $MachinePrecision], If[LessEqual[t$95$1, 1e+204], N[(x - N[(y / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{z - a}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+17}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;t\_1 \leq 0.1:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;t\_1 \leq 2:\\
\;\;\;\;x - y \cdot \frac{t - z}{z}\\
\mathbf{elif}\;t\_1 \leq 10^{+111}:\\
\;\;\;\;y \cdot t\_1\\
\mathbf{elif}\;t\_1 \leq 10^{+204}:\\
\;\;\;\;x - \frac{y}{\frac{z}{t}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 z a)) < -5e17Initial program 97.0%
Taylor expanded in t around inf 88.6%
mul-1-neg88.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 68.5%
mul-1-neg68.5%
sub-neg68.5%
associate-/l*77.0%
Simplified77.0%
if -5e17 < (/.f64 (-.f64 z t) (-.f64 z a)) < 0.10000000000000001Initial program 99.6%
Taylor expanded in z around 0 78.8%
+-commutative78.8%
associate-/l*83.2%
Simplified83.2%
if 0.10000000000000001 < (/.f64 (-.f64 z t) (-.f64 z a)) < 2Initial program 100.0%
Taylor expanded in a around 0 99.9%
if 2 < (/.f64 (-.f64 z t) (-.f64 z a)) < 9.99999999999999957e110Initial program 99.7%
add-cube-cbrt98.3%
pow398.4%
+-commutative98.4%
fma-undefine98.4%
Applied egg-rr98.4%
Taylor expanded in y around inf 89.1%
div-sub89.1%
Simplified89.1%
if 9.99999999999999957e110 < (/.f64 (-.f64 z t) (-.f64 z a)) < 9.99999999999999989e203Initial program 100.0%
Taylor expanded in a around 0 75.8%
clear-num75.6%
un-div-inv87.7%
Applied egg-rr87.7%
Taylor expanded in z around 0 87.7%
associate-*r/87.7%
neg-mul-187.7%
Simplified87.7%
if 9.99999999999999989e203 < (/.f64 (-.f64 z t) (-.f64 z a)) Initial program 84.3%
add-cube-cbrt83.8%
pow383.8%
+-commutative83.8%
fma-undefine83.8%
Applied egg-rr83.8%
Taylor expanded in t around inf 93.3%
neg-mul-193.3%
distribute-frac-neg293.3%
associate-/l*93.3%
Simplified93.3%
Final simplification90.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- z t) (- z a))))
(if (<= t_1 -5e+17)
(- x (* t (/ y z)))
(if (<= t_1 0.1)
(+ x (* (/ y a) (- t z)))
(if (<= t_1 2.0)
(- x (* y (/ (- t z) z)))
(if (<= t_1 1e+111)
(* y t_1)
(if (<= t_1 1e+204) (- x (/ y (/ z t))) (* t (/ y (- a z))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (z - a);
double tmp;
if (t_1 <= -5e+17) {
tmp = x - (t * (y / z));
} else if (t_1 <= 0.1) {
tmp = x + ((y / a) * (t - z));
} else if (t_1 <= 2.0) {
tmp = x - (y * ((t - z) / z));
} else if (t_1 <= 1e+111) {
tmp = y * t_1;
} else if (t_1 <= 1e+204) {
tmp = x - (y / (z / t));
} else {
tmp = t * (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) :: t_1
real(8) :: tmp
t_1 = (z - t) / (z - a)
if (t_1 <= (-5d+17)) then
tmp = x - (t * (y / z))
else if (t_1 <= 0.1d0) then
tmp = x + ((y / a) * (t - z))
else if (t_1 <= 2.0d0) then
tmp = x - (y * ((t - z) / z))
else if (t_1 <= 1d+111) then
tmp = y * t_1
else if (t_1 <= 1d+204) then
tmp = x - (y / (z / t))
else
tmp = t * (y / (a - z))
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) / (z - a);
double tmp;
if (t_1 <= -5e+17) {
tmp = x - (t * (y / z));
} else if (t_1 <= 0.1) {
tmp = x + ((y / a) * (t - z));
} else if (t_1 <= 2.0) {
tmp = x - (y * ((t - z) / z));
} else if (t_1 <= 1e+111) {
tmp = y * t_1;
} else if (t_1 <= 1e+204) {
tmp = x - (y / (z / t));
} else {
tmp = t * (y / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) / (z - a) tmp = 0 if t_1 <= -5e+17: tmp = x - (t * (y / z)) elif t_1 <= 0.1: tmp = x + ((y / a) * (t - z)) elif t_1 <= 2.0: tmp = x - (y * ((t - z) / z)) elif t_1 <= 1e+111: tmp = y * t_1 elif t_1 <= 1e+204: tmp = x - (y / (z / t)) else: tmp = t * (y / (a - z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(z - a)) tmp = 0.0 if (t_1 <= -5e+17) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (t_1 <= 0.1) tmp = Float64(x + Float64(Float64(y / a) * Float64(t - z))); elseif (t_1 <= 2.0) tmp = Float64(x - Float64(y * Float64(Float64(t - z) / z))); elseif (t_1 <= 1e+111) tmp = Float64(y * t_1); elseif (t_1 <= 1e+204) tmp = Float64(x - Float64(y / Float64(z / t))); else tmp = Float64(t * Float64(y / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) / (z - a); tmp = 0.0; if (t_1 <= -5e+17) tmp = x - (t * (y / z)); elseif (t_1 <= 0.1) tmp = x + ((y / a) * (t - z)); elseif (t_1 <= 2.0) tmp = x - (y * ((t - z) / z)); elseif (t_1 <= 1e+111) tmp = y * t_1; elseif (t_1 <= 1e+204) tmp = x - (y / (z / t)); else tmp = t * (y / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+17], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.1], N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2.0], N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+111], N[(y * t$95$1), $MachinePrecision], If[LessEqual[t$95$1, 1e+204], N[(x - N[(y / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{z - a}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+17}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;t\_1 \leq 0.1:\\
\;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{elif}\;t\_1 \leq 2:\\
\;\;\;\;x - y \cdot \frac{t - z}{z}\\
\mathbf{elif}\;t\_1 \leq 10^{+111}:\\
\;\;\;\;y \cdot t\_1\\
\mathbf{elif}\;t\_1 \leq 10^{+204}:\\
\;\;\;\;x - \frac{y}{\frac{z}{t}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 z a)) < -5e17Initial program 97.0%
Taylor expanded in t around inf 88.6%
mul-1-neg88.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 68.5%
mul-1-neg68.5%
sub-neg68.5%
associate-/l*77.0%
Simplified77.0%
if -5e17 < (/.f64 (-.f64 z t) (-.f64 z a)) < 0.10000000000000001Initial program 99.6%
Taylor expanded in a around inf 85.7%
mul-1-neg85.7%
unsub-neg85.7%
*-commutative85.7%
associate-/l*94.1%
Simplified94.1%
if 0.10000000000000001 < (/.f64 (-.f64 z t) (-.f64 z a)) < 2Initial program 100.0%
Taylor expanded in a around 0 99.9%
if 2 < (/.f64 (-.f64 z t) (-.f64 z a)) < 9.99999999999999957e110Initial program 99.7%
add-cube-cbrt98.3%
pow398.4%
+-commutative98.4%
fma-undefine98.4%
Applied egg-rr98.4%
Taylor expanded in y around inf 89.1%
div-sub89.1%
Simplified89.1%
if 9.99999999999999957e110 < (/.f64 (-.f64 z t) (-.f64 z a)) < 9.99999999999999989e203Initial program 100.0%
Taylor expanded in a around 0 75.8%
clear-num75.6%
un-div-inv87.7%
Applied egg-rr87.7%
Taylor expanded in z around 0 87.7%
associate-*r/87.7%
neg-mul-187.7%
Simplified87.7%
if 9.99999999999999989e203 < (/.f64 (-.f64 z t) (-.f64 z a)) Initial program 84.3%
add-cube-cbrt83.8%
pow383.8%
+-commutative83.8%
fma-undefine83.8%
Applied egg-rr83.8%
Taylor expanded in t around inf 93.3%
neg-mul-193.3%
distribute-frac-neg293.3%
associate-/l*93.3%
Simplified93.3%
Final simplification93.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- z t) (- z a))))
(if (<= t_1 -5e+17)
(- x (* t (/ y z)))
(if (<= t_1 0.1)
(+ x (* t (/ y a)))
(if (<= t_1 2.0) (+ y x) (* y t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (z - a);
double tmp;
if (t_1 <= -5e+17) {
tmp = x - (t * (y / z));
} else if (t_1 <= 0.1) {
tmp = x + (t * (y / a));
} else if (t_1 <= 2.0) {
tmp = y + x;
} else {
tmp = y * 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) / (z - a)
if (t_1 <= (-5d+17)) then
tmp = x - (t * (y / z))
else if (t_1 <= 0.1d0) then
tmp = x + (t * (y / a))
else if (t_1 <= 2.0d0) then
tmp = y + x
else
tmp = y * 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) / (z - a);
double tmp;
if (t_1 <= -5e+17) {
tmp = x - (t * (y / z));
} else if (t_1 <= 0.1) {
tmp = x + (t * (y / a));
} else if (t_1 <= 2.0) {
tmp = y + x;
} else {
tmp = y * t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) / (z - a) tmp = 0 if t_1 <= -5e+17: tmp = x - (t * (y / z)) elif t_1 <= 0.1: tmp = x + (t * (y / a)) elif t_1 <= 2.0: tmp = y + x else: tmp = y * t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(z - a)) tmp = 0.0 if (t_1 <= -5e+17) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (t_1 <= 0.1) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (t_1 <= 2.0) tmp = Float64(y + x); else tmp = Float64(y * t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) / (z - a); tmp = 0.0; if (t_1 <= -5e+17) tmp = x - (t * (y / z)); elseif (t_1 <= 0.1) tmp = x + (t * (y / a)); elseif (t_1 <= 2.0) tmp = y + x; else tmp = y * t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+17], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.1], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2.0], N[(y + x), $MachinePrecision], N[(y * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{z - a}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+17}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;t\_1 \leq 0.1:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;t\_1 \leq 2:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;y \cdot t\_1\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 z a)) < -5e17Initial program 97.0%
Taylor expanded in t around inf 88.6%
mul-1-neg88.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 68.5%
mul-1-neg68.5%
sub-neg68.5%
associate-/l*77.0%
Simplified77.0%
if -5e17 < (/.f64 (-.f64 z t) (-.f64 z a)) < 0.10000000000000001Initial program 99.6%
Taylor expanded in z around 0 78.8%
+-commutative78.8%
associate-/l*83.2%
Simplified83.2%
if 0.10000000000000001 < (/.f64 (-.f64 z t) (-.f64 z a)) < 2Initial program 100.0%
Taylor expanded in z around inf 99.2%
+-commutative99.2%
Simplified99.2%
if 2 < (/.f64 (-.f64 z t) (-.f64 z a)) Initial program 93.7%
add-cube-cbrt92.6%
pow392.6%
+-commutative92.6%
fma-undefine92.6%
Applied egg-rr92.6%
Taylor expanded in y around inf 78.0%
div-sub78.0%
Simplified78.0%
Final simplification87.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- z t) (- z a))) (t_2 (+ x (* t (/ y (- a z))))))
(if (<= t_1 -50000000000.0)
t_2
(if (<= t_1 0.1)
(+ x (* (/ y a) (- t z)))
(if (<= t_1 5e+43) (- x (* y (/ (- t z) z))) t_2)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (z - a);
double t_2 = x + (t * (y / (a - z)));
double tmp;
if (t_1 <= -50000000000.0) {
tmp = t_2;
} else if (t_1 <= 0.1) {
tmp = x + ((y / a) * (t - z));
} else if (t_1 <= 5e+43) {
tmp = x - (y * ((t - z) / z));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z - t) / (z - a)
t_2 = x + (t * (y / (a - z)))
if (t_1 <= (-50000000000.0d0)) then
tmp = t_2
else if (t_1 <= 0.1d0) then
tmp = x + ((y / a) * (t - z))
else if (t_1 <= 5d+43) then
tmp = x - (y * ((t - z) / z))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (z - a);
double t_2 = x + (t * (y / (a - z)));
double tmp;
if (t_1 <= -50000000000.0) {
tmp = t_2;
} else if (t_1 <= 0.1) {
tmp = x + ((y / a) * (t - z));
} else if (t_1 <= 5e+43) {
tmp = x - (y * ((t - z) / z));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) / (z - a) t_2 = x + (t * (y / (a - z))) tmp = 0 if t_1 <= -50000000000.0: tmp = t_2 elif t_1 <= 0.1: tmp = x + ((y / a) * (t - z)) elif t_1 <= 5e+43: tmp = x - (y * ((t - z) / z)) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(z - a)) t_2 = Float64(x + Float64(t * Float64(y / Float64(a - z)))) tmp = 0.0 if (t_1 <= -50000000000.0) tmp = t_2; elseif (t_1 <= 0.1) tmp = Float64(x + Float64(Float64(y / a) * Float64(t - z))); elseif (t_1 <= 5e+43) tmp = Float64(x - Float64(y * Float64(Float64(t - z) / z))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) / (z - a); t_2 = x + (t * (y / (a - z))); tmp = 0.0; if (t_1 <= -50000000000.0) tmp = t_2; elseif (t_1 <= 0.1) tmp = x + ((y / a) * (t - z)); elseif (t_1 <= 5e+43) tmp = x - (y * ((t - z) / z)); 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[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -50000000000.0], t$95$2, If[LessEqual[t$95$1, 0.1], N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+43], N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{z - a}\\
t_2 := x + t \cdot \frac{y}{a - z}\\
\mathbf{if}\;t\_1 \leq -50000000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 0.1:\\
\;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+43}:\\
\;\;\;\;x - y \cdot \frac{t - z}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 z a)) < -5e10 or 5.0000000000000004e43 < (/.f64 (-.f64 z t) (-.f64 z a)) Initial program 95.1%
Taylor expanded in t around inf 91.0%
mul-1-neg91.0%
associate-/l*99.4%
Simplified99.4%
if -5e10 < (/.f64 (-.f64 z t) (-.f64 z a)) < 0.10000000000000001Initial program 99.6%
Taylor expanded in a around inf 86.4%
mul-1-neg86.4%
unsub-neg86.4%
*-commutative86.4%
associate-/l*95.1%
Simplified95.1%
if 0.10000000000000001 < (/.f64 (-.f64 z t) (-.f64 z a)) < 5.0000000000000004e43Initial program 100.0%
Taylor expanded in a around 0 98.4%
Final simplification97.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- z t) (- z a))))
(if (<= t_1 -5e+17)
(- x (* t (/ y z)))
(if (<= t_1 2.0) (+ x (* y (/ z (- z a)))) (* y t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (z - a);
double tmp;
if (t_1 <= -5e+17) {
tmp = x - (t * (y / z));
} else if (t_1 <= 2.0) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = y * 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) / (z - a)
if (t_1 <= (-5d+17)) then
tmp = x - (t * (y / z))
else if (t_1 <= 2.0d0) then
tmp = x + (y * (z / (z - a)))
else
tmp = y * 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) / (z - a);
double tmp;
if (t_1 <= -5e+17) {
tmp = x - (t * (y / z));
} else if (t_1 <= 2.0) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = y * t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) / (z - a) tmp = 0 if t_1 <= -5e+17: tmp = x - (t * (y / z)) elif t_1 <= 2.0: tmp = x + (y * (z / (z - a))) else: tmp = y * t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(z - a)) tmp = 0.0 if (t_1 <= -5e+17) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (t_1 <= 2.0) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); else tmp = Float64(y * t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) / (z - a); tmp = 0.0; if (t_1 <= -5e+17) tmp = x - (t * (y / z)); elseif (t_1 <= 2.0) tmp = x + (y * (z / (z - a))); else tmp = y * t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+17], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2.0], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{z - a}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+17}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;t\_1 \leq 2:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot t\_1\\
\end{array}
\end{array}
if (/.f64 (-.f64 z t) (-.f64 z a)) < -5e17Initial program 97.0%
Taylor expanded in t around inf 88.6%
mul-1-neg88.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 68.5%
mul-1-neg68.5%
sub-neg68.5%
associate-/l*77.0%
Simplified77.0%
if -5e17 < (/.f64 (-.f64 z t) (-.f64 z a)) < 2Initial program 99.8%
Taylor expanded in t around 0 74.9%
+-commutative74.9%
associate-/l*92.2%
Simplified92.2%
if 2 < (/.f64 (-.f64 z t) (-.f64 z a)) Initial program 93.7%
add-cube-cbrt92.6%
pow392.6%
+-commutative92.6%
fma-undefine92.6%
Applied egg-rr92.6%
Taylor expanded in y around inf 78.0%
div-sub78.0%
Simplified78.0%
Final simplification87.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -9.5e-40)
(+ y x)
(if (<= z 700000000.0)
(+ x (* t (/ y a)))
(if (or (<= z 4.7e+142) (not (<= z 1.2e+181)))
(+ y x)
(- x (* t (/ y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e-40) {
tmp = y + x;
} else if (z <= 700000000.0) {
tmp = x + (t * (y / a));
} else if ((z <= 4.7e+142) || !(z <= 1.2e+181)) {
tmp = y + x;
} else {
tmp = x - (t * (y / 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 (z <= (-9.5d-40)) then
tmp = y + x
else if (z <= 700000000.0d0) then
tmp = x + (t * (y / a))
else if ((z <= 4.7d+142) .or. (.not. (z <= 1.2d+181))) then
tmp = y + x
else
tmp = x - (t * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e-40) {
tmp = y + x;
} else if (z <= 700000000.0) {
tmp = x + (t * (y / a));
} else if ((z <= 4.7e+142) || !(z <= 1.2e+181)) {
tmp = y + x;
} else {
tmp = x - (t * (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.5e-40: tmp = y + x elif z <= 700000000.0: tmp = x + (t * (y / a)) elif (z <= 4.7e+142) or not (z <= 1.2e+181): tmp = y + x else: tmp = x - (t * (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.5e-40) tmp = Float64(y + x); elseif (z <= 700000000.0) tmp = Float64(x + Float64(t * Float64(y / a))); elseif ((z <= 4.7e+142) || !(z <= 1.2e+181)) tmp = Float64(y + x); else tmp = Float64(x - Float64(t * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.5e-40) tmp = y + x; elseif (z <= 700000000.0) tmp = x + (t * (y / a)); elseif ((z <= 4.7e+142) || ~((z <= 1.2e+181))) tmp = y + x; else tmp = x - (t * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.5e-40], N[(y + x), $MachinePrecision], If[LessEqual[z, 700000000.0], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 4.7e+142], N[Not[LessEqual[z, 1.2e+181]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{-40}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 700000000:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{+142} \lor \neg \left(z \leq 1.2 \cdot 10^{+181}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\end{array}
\end{array}
if z < -9.5000000000000006e-40 or 7e8 < z < 4.7e142 or 1.20000000000000001e181 < z Initial program 99.9%
Taylor expanded in z around inf 78.1%
+-commutative78.1%
Simplified78.1%
if -9.5000000000000006e-40 < z < 7e8Initial program 96.5%
Taylor expanded in z around 0 71.8%
+-commutative71.8%
associate-/l*72.3%
Simplified72.3%
if 4.7e142 < z < 1.20000000000000001e181Initial program 99.7%
Taylor expanded in t around inf 70.2%
mul-1-neg70.2%
associate-/l*86.4%
Simplified86.4%
Taylor expanded in z around inf 70.3%
mul-1-neg70.3%
sub-neg70.3%
associate-/l*86.6%
Simplified86.6%
Final simplification76.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ y z) (- t))))
(if (<= t -4.5e+185)
t_1
(if (<= t 1.8e+182)
(+ y x)
(if (<= t 1.15e+273) t_1 (if (<= t 5.4e+278) (+ y x) (/ (* y t) a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / z) * -t;
double tmp;
if (t <= -4.5e+185) {
tmp = t_1;
} else if (t <= 1.8e+182) {
tmp = y + x;
} else if (t <= 1.15e+273) {
tmp = t_1;
} else if (t <= 5.4e+278) {
tmp = y + x;
} else {
tmp = (y * t) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (y / z) * -t
if (t <= (-4.5d+185)) then
tmp = t_1
else if (t <= 1.8d+182) then
tmp = y + x
else if (t <= 1.15d+273) then
tmp = t_1
else if (t <= 5.4d+278) then
tmp = y + x
else
tmp = (y * t) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y / z) * -t;
double tmp;
if (t <= -4.5e+185) {
tmp = t_1;
} else if (t <= 1.8e+182) {
tmp = y + x;
} else if (t <= 1.15e+273) {
tmp = t_1;
} else if (t <= 5.4e+278) {
tmp = y + x;
} else {
tmp = (y * t) / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / z) * -t tmp = 0 if t <= -4.5e+185: tmp = t_1 elif t <= 1.8e+182: tmp = y + x elif t <= 1.15e+273: tmp = t_1 elif t <= 5.4e+278: tmp = y + x else: tmp = (y * t) / a return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / z) * Float64(-t)) tmp = 0.0 if (t <= -4.5e+185) tmp = t_1; elseif (t <= 1.8e+182) tmp = Float64(y + x); elseif (t <= 1.15e+273) tmp = t_1; elseif (t <= 5.4e+278) tmp = Float64(y + x); else tmp = Float64(Float64(y * t) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y / z) * -t; tmp = 0.0; if (t <= -4.5e+185) tmp = t_1; elseif (t <= 1.8e+182) tmp = y + x; elseif (t <= 1.15e+273) tmp = t_1; elseif (t <= 5.4e+278) tmp = y + x; else tmp = (y * t) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] * (-t)), $MachinePrecision]}, If[LessEqual[t, -4.5e+185], t$95$1, If[LessEqual[t, 1.8e+182], N[(y + x), $MachinePrecision], If[LessEqual[t, 1.15e+273], t$95$1, If[LessEqual[t, 5.4e+278], N[(y + x), $MachinePrecision], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z} \cdot \left(-t\right)\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{+185}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+182}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+273}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{+278}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\end{array}
\end{array}
if t < -4.5000000000000002e185 or 1.8e182 < t < 1.15e273Initial program 93.8%
Taylor expanded in y around inf 87.0%
associate--l+87.0%
div-sub87.0%
Simplified87.0%
Taylor expanded in t around inf 71.0%
associate-*r/71.0%
neg-mul-171.0%
Simplified71.0%
Taylor expanded in z around inf 51.0%
mul-1-neg51.0%
associate-*r/57.4%
distribute-rgt-neg-in57.4%
distribute-frac-neg257.4%
Simplified57.4%
if -4.5000000000000002e185 < t < 1.8e182 or 1.15e273 < t < 5.40000000000000021e278Initial program 99.8%
Taylor expanded in z around inf 71.0%
+-commutative71.0%
Simplified71.0%
if 5.40000000000000021e278 < t Initial program 86.1%
Taylor expanded in y around inf 86.1%
associate--l+86.1%
div-sub86.1%
Simplified86.1%
Taylor expanded in t around inf 72.6%
associate-*r/72.6%
neg-mul-172.6%
Simplified72.6%
Taylor expanded in z around 0 44.3%
associate-*r/57.9%
Applied egg-rr57.9%
Final simplification68.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.6e+184) (not (<= t 4.8e+164))) (* y (- 1.0 (/ t z))) (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.6e+184) || !(t <= 4.8e+164)) {
tmp = y * (1.0 - (t / 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 <= (-2.6d+184)) .or. (.not. (t <= 4.8d+164))) then
tmp = y * (1.0d0 - (t / 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 <= -2.6e+184) || !(t <= 4.8e+164)) {
tmp = y * (1.0 - (t / z));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.6e+184) or not (t <= 4.8e+164): tmp = y * (1.0 - (t / z)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.6e+184) || !(t <= 4.8e+164)) tmp = Float64(y * Float64(1.0 - Float64(t / z))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.6e+184) || ~((t <= 4.8e+164))) tmp = y * (1.0 - (t / z)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.6e+184], N[Not[LessEqual[t, 4.8e+164]], $MachinePrecision]], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{+184} \lor \neg \left(t \leq 4.8 \cdot 10^{+164}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -2.59999999999999993e184 or 4.80000000000000021e164 < t Initial program 94.0%
Taylor expanded in a around 0 69.5%
Taylor expanded in y around inf 53.8%
if -2.59999999999999993e184 < t < 4.80000000000000021e164Initial program 99.8%
Taylor expanded in z around inf 71.8%
+-commutative71.8%
Simplified71.8%
Final simplification67.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -7.2e-41) (not (<= z 2.3e+25))) (+ y x) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7.2e-41) || !(z <= 2.3e+25)) {
tmp = y + x;
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-7.2d-41)) .or. (.not. (z <= 2.3d+25))) then
tmp = y + x
else
tmp = x + ((y * t) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7.2e-41) || !(z <= 2.3e+25)) {
tmp = y + x;
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -7.2e-41) or not (z <= 2.3e+25): tmp = y + x else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -7.2e-41) || !(z <= 2.3e+25)) tmp = Float64(y + x); else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -7.2e-41) || ~((z <= 2.3e+25))) tmp = y + x; else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7.2e-41], N[Not[LessEqual[z, 2.3e+25]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{-41} \lor \neg \left(z \leq 2.3 \cdot 10^{+25}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -7.2e-41 or 2.2999999999999998e25 < z Initial program 99.9%
Taylor expanded in z around inf 76.3%
+-commutative76.3%
Simplified76.3%
if -7.2e-41 < z < 2.2999999999999998e25Initial program 96.6%
Taylor expanded in z around 0 71.5%
Final simplification74.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8.6e-40) (not (<= z 130.0))) (+ y x) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.6e-40) || !(z <= 130.0)) {
tmp = y + x;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-8.6d-40)) .or. (.not. (z <= 130.0d0))) then
tmp = y + x
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.6e-40) || !(z <= 130.0)) {
tmp = y + x;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8.6e-40) or not (z <= 130.0): tmp = y + x else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8.6e-40) || !(z <= 130.0)) tmp = Float64(y + x); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8.6e-40) || ~((z <= 130.0))) tmp = y + x; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8.6e-40], N[Not[LessEqual[z, 130.0]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.6 \cdot 10^{-40} \lor \neg \left(z \leq 130\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -8.6000000000000005e-40 or 130 < z Initial program 99.9%
Taylor expanded in z around inf 75.9%
+-commutative75.9%
Simplified75.9%
if -8.6000000000000005e-40 < z < 130Initial program 96.5%
Taylor expanded in z around 0 71.8%
+-commutative71.8%
associate-/l*72.3%
Simplified72.3%
Final simplification74.4%
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * ((z - t) / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
Initial program 98.4%
Final simplification98.4%
(FPCore (x y z t a) :precision binary64 (if (<= t -6.6e+246) (* y (/ t a)) (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.6e+246) {
tmp = y * (t / 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 <= (-6.6d+246)) then
tmp = y * (t / 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 <= -6.6e+246) {
tmp = y * (t / a);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.6e+246: tmp = y * (t / a) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.6e+246) tmp = Float64(y * Float64(t / a)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6.6e+246) tmp = y * (t / a); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.6e+246], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.6 \cdot 10^{+246}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -6.6e246Initial program 90.4%
Taylor expanded in y around inf 81.0%
associate--l+81.0%
div-sub81.0%
Simplified81.0%
Taylor expanded in t around inf 80.6%
associate-*r/80.6%
neg-mul-180.6%
Simplified80.6%
Taylor expanded in z around 0 70.6%
if -6.6e246 < t Initial program 98.8%
Taylor expanded in z around inf 63.6%
+-commutative63.6%
Simplified63.6%
Final simplification63.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -2e+249) (/ (* y t) a) (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2e+249) {
tmp = (y * t) / 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 <= (-2d+249)) then
tmp = (y * t) / 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 <= -2e+249) {
tmp = (y * t) / a;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2e+249: tmp = (y * t) / a else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2e+249) tmp = Float64(Float64(y * t) / a); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2e+249) tmp = (y * t) / a; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2e+249], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+249}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -1.9999999999999998e249Initial program 90.4%
Taylor expanded in y around inf 81.0%
associate--l+81.0%
div-sub81.0%
Simplified81.0%
Taylor expanded in t around inf 80.6%
associate-*r/80.6%
neg-mul-180.6%
Simplified80.6%
Taylor expanded in z around 0 70.6%
associate-*r/73.8%
Applied egg-rr73.8%
if -1.9999999999999998e249 < t Initial program 98.8%
Taylor expanded in z around inf 63.6%
+-commutative63.6%
Simplified63.6%
Final simplification64.0%
(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 98.4%
Taylor expanded in z around inf 61.6%
+-commutative61.6%
Simplified61.6%
Final simplification61.6%
(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.4%
Taylor expanded in x around inf 47.1%
Final simplification47.1%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
herbie shell --seed 2024096
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
:precision binary64
:alt
(+ x (/ y (/ (- z a) (- z t))))
(+ x (* y (/ (- z t) (- z a)))))