
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
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 - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * t) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) t) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
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 - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * t) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * t) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * t) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (/ (- y z) (/ (- a z) t))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) / ((a - z) / t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) / ((a - z) / t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) / ((a - z) / t));
}
def code(x, y, z, t, a): return x + ((y - z) / ((a - z) / t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) / Float64(Float64(a - 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[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y - z}{\frac{a - z}{t}}
\end{array}
Initial program 83.8%
associate-/l*98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.75e+16)
(+ x t)
(if (<= z 550000000000.0)
(+ x (* y (/ t a)))
(if (<= z 6.3e+214) (- x (* y (/ t z))) (+ x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.75e+16) {
tmp = x + t;
} else if (z <= 550000000000.0) {
tmp = x + (y * (t / a));
} else if (z <= 6.3e+214) {
tmp = x - (y * (t / z));
} else {
tmp = x + t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.75d+16)) then
tmp = x + t
else if (z <= 550000000000.0d0) then
tmp = x + (y * (t / a))
else if (z <= 6.3d+214) then
tmp = x - (y * (t / z))
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.75e+16) {
tmp = x + t;
} else if (z <= 550000000000.0) {
tmp = x + (y * (t / a));
} else if (z <= 6.3e+214) {
tmp = x - (y * (t / z));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.75e+16: tmp = x + t elif z <= 550000000000.0: tmp = x + (y * (t / a)) elif z <= 6.3e+214: tmp = x - (y * (t / z)) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.75e+16) tmp = Float64(x + t); elseif (z <= 550000000000.0) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 6.3e+214) tmp = Float64(x - Float64(y * Float64(t / z))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.75e+16) tmp = x + t; elseif (z <= 550000000000.0) tmp = x + (y * (t / a)); elseif (z <= 6.3e+214) tmp = x - (y * (t / z)); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.75e+16], N[(x + t), $MachinePrecision], If[LessEqual[z, 550000000000.0], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.3e+214], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.75 \cdot 10^{+16}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 550000000000:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 6.3 \cdot 10^{+214}:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -2.75e16 or 6.3e214 < z Initial program 70.3%
associate-/l*97.7%
Simplified97.7%
Taylor expanded in z around inf 77.0%
if -2.75e16 < z < 5.5e11Initial program 92.0%
+-commutative92.0%
associate-*r/99.8%
fma-def99.8%
Simplified99.8%
fma-udef99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 80.0%
associate-*r/87.1%
Simplified87.1%
if 5.5e11 < z < 6.3e214Initial program 88.1%
associate-/l*95.2%
Simplified95.2%
Taylor expanded in y around inf 70.6%
associate-/l*76.0%
associate-/r/80.0%
Simplified80.0%
Taylor expanded in a around 0 66.8%
+-commutative66.8%
mul-1-neg66.8%
unsub-neg66.8%
associate-*r/73.6%
Simplified73.6%
Final simplification81.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.8e+15)
(+ x t)
(if (<= z 1.25e+15)
(+ x (* y (/ t a)))
(if (<= z 8.5e+214) (- x (/ t (/ z y))) (+ x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e+15) {
tmp = x + t;
} else if (z <= 1.25e+15) {
tmp = x + (y * (t / a));
} else if (z <= 8.5e+214) {
tmp = x - (t / (z / y));
} else {
tmp = x + t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.8d+15)) then
tmp = x + t
else if (z <= 1.25d+15) then
tmp = x + (y * (t / a))
else if (z <= 8.5d+214) then
tmp = x - (t / (z / y))
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e+15) {
tmp = x + t;
} else if (z <= 1.25e+15) {
tmp = x + (y * (t / a));
} else if (z <= 8.5e+214) {
tmp = x - (t / (z / y));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.8e+15: tmp = x + t elif z <= 1.25e+15: tmp = x + (y * (t / a)) elif z <= 8.5e+214: tmp = x - (t / (z / y)) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.8e+15) tmp = Float64(x + t); elseif (z <= 1.25e+15) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 8.5e+214) tmp = Float64(x - Float64(t / Float64(z / y))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.8e+15) tmp = x + t; elseif (z <= 1.25e+15) tmp = x + (y * (t / a)); elseif (z <= 8.5e+214) tmp = x - (t / (z / y)); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e+15], N[(x + t), $MachinePrecision], If[LessEqual[z, 1.25e+15], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+214], N[(x - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+15}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+15}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+214}:\\
\;\;\;\;x - \frac{t}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -3.8e15 or 8.50000000000000045e214 < z Initial program 70.3%
associate-/l*97.7%
Simplified97.7%
Taylor expanded in z around inf 77.0%
if -3.8e15 < z < 1.25e15Initial program 92.0%
+-commutative92.0%
associate-*r/99.8%
fma-def99.8%
Simplified99.8%
fma-udef99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 80.0%
associate-*r/87.1%
Simplified87.1%
if 1.25e15 < z < 8.50000000000000045e214Initial program 88.1%
associate-/l*95.2%
Simplified95.2%
Taylor expanded in a around 0 73.6%
+-commutative73.6%
mul-1-neg73.6%
unsub-neg73.6%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in z around 0 75.3%
Final simplification81.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -95000000000000.0)
(+ x t)
(if (<= z 7200.0)
(+ x (* y (/ t a)))
(if (<= z 1.1e+216) (- x (* t (/ y z))) (+ x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -95000000000000.0) {
tmp = x + t;
} else if (z <= 7200.0) {
tmp = x + (y * (t / a));
} else if (z <= 1.1e+216) {
tmp = x - (t * (y / z));
} else {
tmp = x + t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-95000000000000.0d0)) then
tmp = x + t
else if (z <= 7200.0d0) then
tmp = x + (y * (t / a))
else if (z <= 1.1d+216) then
tmp = x - (t * (y / z))
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -95000000000000.0) {
tmp = x + t;
} else if (z <= 7200.0) {
tmp = x + (y * (t / a));
} else if (z <= 1.1e+216) {
tmp = x - (t * (y / z));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -95000000000000.0: tmp = x + t elif z <= 7200.0: tmp = x + (y * (t / a)) elif z <= 1.1e+216: tmp = x - (t * (y / z)) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -95000000000000.0) tmp = Float64(x + t); elseif (z <= 7200.0) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 1.1e+216) tmp = Float64(x - Float64(t * Float64(y / z))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -95000000000000.0) tmp = x + t; elseif (z <= 7200.0) tmp = x + (y * (t / a)); elseif (z <= 1.1e+216) tmp = x - (t * (y / z)); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -95000000000000.0], N[(x + t), $MachinePrecision], If[LessEqual[z, 7200.0], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+216], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -95000000000000:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 7200:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+216}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -9.5e13 or 1.1e216 < z Initial program 70.3%
associate-/l*97.7%
Simplified97.7%
Taylor expanded in z around inf 77.0%
if -9.5e13 < z < 7200Initial program 92.0%
+-commutative92.0%
associate-*r/99.8%
fma-def99.8%
Simplified99.8%
fma-udef99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 80.0%
associate-*r/87.1%
Simplified87.1%
if 7200 < z < 1.1e216Initial program 88.1%
associate-/l*95.2%
Simplified95.2%
Taylor expanded in y around inf 70.6%
associate-/l*76.0%
associate-/r/80.0%
Simplified80.0%
Taylor expanded in a around 0 75.3%
associate-*r/75.3%
neg-mul-175.3%
Simplified75.3%
Final simplification81.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.85e+20) (not (<= z 13500000000.0))) (+ x (- t (* y (/ t z)))) (+ x (* t (/ y (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.85e+20) || !(z <= 13500000000.0)) {
tmp = x + (t - (y * (t / z)));
} else {
tmp = x + (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) :: tmp
if ((z <= (-1.85d+20)) .or. (.not. (z <= 13500000000.0d0))) then
tmp = x + (t - (y * (t / z)))
else
tmp = x + (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 tmp;
if ((z <= -1.85e+20) || !(z <= 13500000000.0)) {
tmp = x + (t - (y * (t / z)));
} else {
tmp = x + (t * (y / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.85e+20) or not (z <= 13500000000.0): tmp = x + (t - (y * (t / z))) else: tmp = x + (t * (y / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.85e+20) || !(z <= 13500000000.0)) tmp = Float64(x + Float64(t - Float64(y * Float64(t / z)))); else tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.85e+20) || ~((z <= 13500000000.0))) tmp = x + (t - (y * (t / z))); else tmp = x + (t * (y / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.85e+20], N[Not[LessEqual[z, 13500000000.0]], $MachinePrecision]], N[(x + N[(t - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+20} \lor \neg \left(z \leq 13500000000\right):\\
\;\;\;\;x + \left(t - y \cdot \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if z < -1.85e20 or 1.35e10 < z Initial program 75.8%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in a around 0 86.1%
neg-mul-186.1%
distribute-neg-frac86.1%
Simplified86.1%
Taylor expanded in y around 0 79.9%
+-commutative79.9%
mul-1-neg79.9%
unsub-neg79.9%
associate-*r/87.5%
Simplified87.5%
if -1.85e20 < z < 1.35e10Initial program 92.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around inf 86.6%
associate-/l*94.5%
associate-/r/91.4%
Simplified91.4%
Final simplification89.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -0.19) (not (<= z 4.2e+15))) (+ x (- t (* y (/ t z)))) (+ x (/ y (/ (- a z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -0.19) || !(z <= 4.2e+15)) {
tmp = x + (t - (y * (t / z)));
} else {
tmp = x + (y / ((a - z) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-0.19d0)) .or. (.not. (z <= 4.2d+15))) then
tmp = x + (t - (y * (t / z)))
else
tmp = x + (y / ((a - z) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -0.19) || !(z <= 4.2e+15)) {
tmp = x + (t - (y * (t / z)));
} else {
tmp = x + (y / ((a - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -0.19) or not (z <= 4.2e+15): tmp = x + (t - (y * (t / z))) else: tmp = x + (y / ((a - z) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -0.19) || !(z <= 4.2e+15)) tmp = Float64(x + Float64(t - Float64(y * Float64(t / z)))); else tmp = Float64(x + Float64(y / Float64(Float64(a - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -0.19) || ~((z <= 4.2e+15))) tmp = x + (t - (y * (t / z))); else tmp = x + (y / ((a - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -0.19], N[Not[LessEqual[z, 4.2e+15]], $MachinePrecision]], N[(x + N[(t - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.19 \lor \neg \left(z \leq 4.2 \cdot 10^{+15}\right):\\
\;\;\;\;x + \left(t - y \cdot \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\
\end{array}
\end{array}
if z < -0.19 or 4.2e15 < z Initial program 75.8%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in a around 0 86.1%
neg-mul-186.1%
distribute-neg-frac86.1%
Simplified86.1%
Taylor expanded in y around 0 79.9%
+-commutative79.9%
mul-1-neg79.9%
unsub-neg79.9%
associate-*r/87.5%
Simplified87.5%
if -0.19 < z < 4.2e15Initial program 92.0%
+-commutative92.0%
associate-*r/99.8%
fma-def99.8%
Simplified99.8%
fma-udef99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 86.6%
associate-/l*94.5%
Simplified94.5%
Final simplification90.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.1e+20) (not (<= z 2.65e+17))) (+ x (- t (/ y (/ z t)))) (+ x (/ y (/ (- a z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.1e+20) || !(z <= 2.65e+17)) {
tmp = x + (t - (y / (z / t)));
} else {
tmp = x + (y / ((a - z) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.1d+20)) .or. (.not. (z <= 2.65d+17))) then
tmp = x + (t - (y / (z / t)))
else
tmp = x + (y / ((a - z) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.1e+20) || !(z <= 2.65e+17)) {
tmp = x + (t - (y / (z / t)));
} else {
tmp = x + (y / ((a - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.1e+20) or not (z <= 2.65e+17): tmp = x + (t - (y / (z / t))) else: tmp = x + (y / ((a - z) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.1e+20) || !(z <= 2.65e+17)) tmp = Float64(x + Float64(t - Float64(y / Float64(z / t)))); else tmp = Float64(x + Float64(y / Float64(Float64(a - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.1e+20) || ~((z <= 2.65e+17))) tmp = x + (t - (y / (z / t))); else tmp = x + (y / ((a - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.1e+20], N[Not[LessEqual[z, 2.65e+17]], $MachinePrecision]], N[(x + N[(t - N[(y / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+20} \lor \neg \left(z \leq 2.65 \cdot 10^{+17}\right):\\
\;\;\;\;x + \left(t - \frac{y}{\frac{z}{t}}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\
\end{array}
\end{array}
if z < -2.1e20 or 2.65e17 < z Initial program 75.8%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in a around 0 65.2%
+-commutative65.2%
mul-1-neg65.2%
unsub-neg65.2%
associate-/l*88.3%
Simplified88.3%
Taylor expanded in z around 0 79.9%
+-commutative79.9%
mul-1-neg79.9%
unsub-neg79.9%
associate-/l*87.6%
Simplified87.6%
if -2.1e20 < z < 2.65e17Initial program 92.0%
+-commutative92.0%
associate-*r/99.8%
fma-def99.8%
Simplified99.8%
fma-udef99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 86.6%
associate-/l*94.5%
Simplified94.5%
Final simplification91.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- a z) t)))
(if (or (<= y -1.25e+25) (not (<= y 1.46e-80)))
(+ x (/ y t_1))
(- x (/ z t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a - z) / t;
double tmp;
if ((y <= -1.25e+25) || !(y <= 1.46e-80)) {
tmp = x + (y / t_1);
} else {
tmp = x - (z / 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 = (a - z) / t
if ((y <= (-1.25d+25)) .or. (.not. (y <= 1.46d-80))) then
tmp = x + (y / t_1)
else
tmp = x - (z / 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 = (a - z) / t;
double tmp;
if ((y <= -1.25e+25) || !(y <= 1.46e-80)) {
tmp = x + (y / t_1);
} else {
tmp = x - (z / t_1);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a - z) / t tmp = 0 if (y <= -1.25e+25) or not (y <= 1.46e-80): tmp = x + (y / t_1) else: tmp = x - (z / t_1) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a - z) / t) tmp = 0.0 if ((y <= -1.25e+25) || !(y <= 1.46e-80)) tmp = Float64(x + Float64(y / t_1)); else tmp = Float64(x - Float64(z / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a - z) / t; tmp = 0.0; if ((y <= -1.25e+25) || ~((y <= 1.46e-80))) tmp = x + (y / t_1); else tmp = x - (z / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]}, If[Or[LessEqual[y, -1.25e+25], N[Not[LessEqual[y, 1.46e-80]], $MachinePrecision]], N[(x + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision], N[(x - N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a - z}{t}\\
\mathbf{if}\;y \leq -1.25 \cdot 10^{+25} \lor \neg \left(y \leq 1.46 \cdot 10^{-80}\right):\\
\;\;\;\;x + \frac{y}{t_1}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z}{t_1}\\
\end{array}
\end{array}
if y < -1.25000000000000006e25 or 1.46e-80 < y Initial program 79.9%
+-commutative79.9%
associate-*r/97.8%
fma-def97.8%
Simplified97.8%
fma-udef97.8%
Applied egg-rr97.8%
Taylor expanded in y around inf 80.1%
associate-/l*89.4%
Simplified89.4%
if -1.25000000000000006e25 < y < 1.46e-80Initial program 88.6%
associate-*l/99.9%
Simplified99.9%
associate-*l/88.6%
clear-num88.5%
Applied egg-rr88.5%
Taylor expanded in y around 0 84.6%
fma-def84.6%
*-commutative84.6%
fma-def84.6%
neg-mul-184.6%
+-commutative84.6%
sub-neg84.6%
associate-/l*94.4%
Simplified94.4%
Final simplification91.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -7.2e+14) (not (<= y 1.55e-80))) (+ x (/ y (/ (- a z) t))) (- x (* z (/ t (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -7.2e+14) || !(y <= 1.55e-80)) {
tmp = x + (y / ((a - z) / t));
} else {
tmp = x - (z * (t / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-7.2d+14)) .or. (.not. (y <= 1.55d-80))) then
tmp = x + (y / ((a - z) / t))
else
tmp = x - (z * (t / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -7.2e+14) || !(y <= 1.55e-80)) {
tmp = x + (y / ((a - z) / t));
} else {
tmp = x - (z * (t / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -7.2e+14) or not (y <= 1.55e-80): tmp = x + (y / ((a - z) / t)) else: tmp = x - (z * (t / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -7.2e+14) || !(y <= 1.55e-80)) tmp = Float64(x + Float64(y / Float64(Float64(a - z) / t))); else tmp = Float64(x - Float64(z * Float64(t / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -7.2e+14) || ~((y <= 1.55e-80))) tmp = x + (y / ((a - z) / t)); else tmp = x - (z * (t / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -7.2e+14], N[Not[LessEqual[y, 1.55e-80]], $MachinePrecision]], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+14} \lor \neg \left(y \leq 1.55 \cdot 10^{-80}\right):\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \frac{t}{a - z}\\
\end{array}
\end{array}
if y < -7.2e14 or 1.55000000000000008e-80 < y Initial program 79.9%
+-commutative79.9%
associate-*r/97.8%
fma-def97.8%
Simplified97.8%
fma-udef97.8%
Applied egg-rr97.8%
Taylor expanded in y around inf 80.1%
associate-/l*89.4%
Simplified89.4%
if -7.2e14 < y < 1.55000000000000008e-80Initial program 88.6%
associate-/l*99.0%
Simplified99.0%
Taylor expanded in y around 0 84.6%
mul-1-neg84.6%
*-commutative84.6%
associate-*r/94.4%
*-commutative94.4%
distribute-rgt-neg-in94.4%
Simplified94.4%
Final simplification91.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.45e+20) (not (<= y 8e-81))) (+ x (/ y (/ (- a z) t))) (- x (/ t (/ (- a z) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.45e+20) || !(y <= 8e-81)) {
tmp = x + (y / ((a - z) / t));
} else {
tmp = x - (t / ((a - z) / 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 ((y <= (-1.45d+20)) .or. (.not. (y <= 8d-81))) then
tmp = x + (y / ((a - z) / t))
else
tmp = x - (t / ((a - z) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.45e+20) || !(y <= 8e-81)) {
tmp = x + (y / ((a - z) / t));
} else {
tmp = x - (t / ((a - z) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.45e+20) or not (y <= 8e-81): tmp = x + (y / ((a - z) / t)) else: tmp = x - (t / ((a - z) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.45e+20) || !(y <= 8e-81)) tmp = Float64(x + Float64(y / Float64(Float64(a - z) / t))); else tmp = Float64(x - Float64(t / Float64(Float64(a - z) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.45e+20) || ~((y <= 8e-81))) tmp = x + (y / ((a - z) / t)); else tmp = x - (t / ((a - z) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.45e+20], N[Not[LessEqual[y, 8e-81]], $MachinePrecision]], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t / N[(N[(a - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+20} \lor \neg \left(y \leq 8 \cdot 10^{-81}\right):\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{t}{\frac{a - z}{z}}\\
\end{array}
\end{array}
if y < -1.45e20 or 7.9999999999999997e-81 < y Initial program 79.9%
+-commutative79.9%
associate-*r/97.8%
fma-def97.8%
Simplified97.8%
fma-udef97.8%
Applied egg-rr97.8%
Taylor expanded in y around inf 80.1%
associate-/l*89.4%
Simplified89.4%
if -1.45e20 < y < 7.9999999999999997e-81Initial program 88.6%
+-commutative88.6%
associate-*r/99.0%
fma-def99.0%
Simplified99.0%
fma-udef99.0%
Applied egg-rr99.0%
Taylor expanded in y around 0 84.6%
mul-1-neg84.6%
associate-/l*95.3%
Simplified95.3%
Final simplification92.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -9e+181) (+ x t) (if (<= z 7.4e+214) (+ x (* t (/ y (- a z)))) (+ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9e+181) {
tmp = x + t;
} else if (z <= 7.4e+214) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-9d+181)) then
tmp = x + t
else if (z <= 7.4d+214) then
tmp = x + (t * (y / (a - z)))
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9e+181) {
tmp = x + t;
} else if (z <= 7.4e+214) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9e+181: tmp = x + t elif z <= 7.4e+214: tmp = x + (t * (y / (a - z))) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9e+181) tmp = Float64(x + t); elseif (z <= 7.4e+214) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9e+181) tmp = x + t; elseif (z <= 7.4e+214) tmp = x + (t * (y / (a - z))); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9e+181], N[(x + t), $MachinePrecision], If[LessEqual[z, 7.4e+214], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+181}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 7.4 \cdot 10^{+214}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -9e181 or 7.39999999999999962e214 < z Initial program 51.5%
associate-/l*98.0%
Simplified98.0%
Taylor expanded in z around inf 89.6%
if -9e181 < z < 7.39999999999999962e214Initial program 91.8%
associate-/l*98.5%
Simplified98.5%
Taylor expanded in y around inf 79.8%
associate-/l*85.7%
associate-/r/84.6%
Simplified84.6%
Final simplification85.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.4e+17) (+ x (- t (/ y (/ z t)))) (if (<= z 2.8e+17) (+ x (/ y (/ (- a z) t))) (- x (/ t (/ z (- y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.4e+17) {
tmp = x + (t - (y / (z / t)));
} else if (z <= 2.8e+17) {
tmp = x + (y / ((a - z) / t));
} else {
tmp = x - (t / (z / (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 <= (-2.4d+17)) then
tmp = x + (t - (y / (z / t)))
else if (z <= 2.8d+17) then
tmp = x + (y / ((a - z) / t))
else
tmp = x - (t / (z / (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 <= -2.4e+17) {
tmp = x + (t - (y / (z / t)));
} else if (z <= 2.8e+17) {
tmp = x + (y / ((a - z) / t));
} else {
tmp = x - (t / (z / (y - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.4e+17: tmp = x + (t - (y / (z / t))) elif z <= 2.8e+17: tmp = x + (y / ((a - z) / t)) else: tmp = x - (t / (z / (y - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.4e+17) tmp = Float64(x + Float64(t - Float64(y / Float64(z / t)))); elseif (z <= 2.8e+17) tmp = Float64(x + Float64(y / Float64(Float64(a - z) / t))); else tmp = Float64(x - Float64(t / Float64(z / Float64(y - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.4e+17) tmp = x + (t - (y / (z / t))); elseif (z <= 2.8e+17) tmp = x + (y / ((a - z) / t)); else tmp = x - (t / (z / (y - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.4e+17], N[(x + N[(t - N[(y / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e+17], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+17}:\\
\;\;\;\;x + \left(t - \frac{y}{\frac{z}{t}}\right)\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+17}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{t}{\frac{z}{y - z}}\\
\end{array}
\end{array}
if z < -2.4e17Initial program 78.4%
associate-/l*97.0%
Simplified97.0%
Taylor expanded in a around 0 69.3%
+-commutative69.3%
mul-1-neg69.3%
unsub-neg69.3%
associate-/l*89.5%
Simplified89.5%
Taylor expanded in z around 0 83.8%
+-commutative83.8%
mul-1-neg83.8%
unsub-neg83.8%
associate-/l*89.6%
Simplified89.6%
if -2.4e17 < z < 2.8e17Initial program 92.0%
+-commutative92.0%
associate-*r/99.8%
fma-def99.8%
Simplified99.8%
fma-udef99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 86.6%
associate-/l*94.5%
Simplified94.5%
if 2.8e17 < z Initial program 73.1%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in a around 0 60.8%
+-commutative60.8%
mul-1-neg60.8%
unsub-neg60.8%
associate-/l*87.0%
Simplified87.0%
Final simplification91.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.12e+257) (not (<= y 3.5e+195))) (* t (/ (- y z) a)) (+ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.12e+257) || !(y <= 3.5e+195)) {
tmp = t * ((y - z) / a);
} else {
tmp = x + t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.12d+257)) .or. (.not. (y <= 3.5d+195))) then
tmp = t * ((y - z) / a)
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.12e+257) || !(y <= 3.5e+195)) {
tmp = t * ((y - z) / a);
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.12e+257) or not (y <= 3.5e+195): tmp = t * ((y - z) / a) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.12e+257) || !(y <= 3.5e+195)) tmp = Float64(t * Float64(Float64(y - z) / a)); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.12e+257) || ~((y <= 3.5e+195))) tmp = t * ((y - z) / a); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.12e+257], N[Not[LessEqual[y, 3.5e+195]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.12 \cdot 10^{+257} \lor \neg \left(y \leq 3.5 \cdot 10^{+195}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if y < -1.11999999999999995e257 or 3.5000000000000002e195 < y Initial program 76.0%
associate-*l/90.7%
Simplified90.7%
Taylor expanded in a around inf 61.4%
Taylor expanded in t around inf 55.7%
div-sub55.7%
Simplified55.7%
if -1.11999999999999995e257 < y < 3.5000000000000002e195Initial program 84.9%
associate-/l*98.6%
Simplified98.6%
Taylor expanded in z around inf 63.3%
Final simplification62.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -32500000.0) (+ x t) (if (<= z 1.45e+17) (+ x (* t (/ y a))) (+ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -32500000.0) {
tmp = x + t;
} else if (z <= 1.45e+17) {
tmp = x + (t * (y / a));
} else {
tmp = x + t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-32500000.0d0)) then
tmp = x + t
else if (z <= 1.45d+17) then
tmp = x + (t * (y / a))
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -32500000.0) {
tmp = x + t;
} else if (z <= 1.45e+17) {
tmp = x + (t * (y / a));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -32500000.0: tmp = x + t elif z <= 1.45e+17: tmp = x + (t * (y / a)) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -32500000.0) tmp = Float64(x + t); elseif (z <= 1.45e+17) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -32500000.0) tmp = x + t; elseif (z <= 1.45e+17) tmp = x + (t * (y / a)); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -32500000.0], N[(x + t), $MachinePrecision], If[LessEqual[z, 1.45e+17], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -32500000:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+17}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -3.25e7 or 1.45e17 < z Initial program 75.8%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in z around inf 69.9%
if -3.25e7 < z < 1.45e17Initial program 92.0%
associate-*l/96.9%
Simplified96.9%
Taylor expanded in z around 0 87.0%
Final simplification78.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.55e+23) (+ x t) (if (<= z 1.9e+17) (+ x (* y (/ t a))) (+ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.55e+23) {
tmp = x + t;
} else if (z <= 1.9e+17) {
tmp = x + (y * (t / a));
} else {
tmp = x + t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.55d+23)) then
tmp = x + t
else if (z <= 1.9d+17) then
tmp = x + (y * (t / a))
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.55e+23) {
tmp = x + t;
} else if (z <= 1.9e+17) {
tmp = x + (y * (t / a));
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.55e+23: tmp = x + t elif z <= 1.9e+17: tmp = x + (y * (t / a)) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.55e+23) tmp = Float64(x + t); elseif (z <= 1.9e+17) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.55e+23) tmp = x + t; elseif (z <= 1.9e+17) tmp = x + (y * (t / a)); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.55e+23], N[(x + t), $MachinePrecision], If[LessEqual[z, 1.9e+17], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.55 \cdot 10^{+23}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+17}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -2.5500000000000001e23 or 1.9e17 < z Initial program 75.8%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in z around inf 69.9%
if -2.5500000000000001e23 < z < 1.9e17Initial program 92.0%
+-commutative92.0%
associate-*r/99.8%
fma-def99.8%
Simplified99.8%
fma-udef99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 80.0%
associate-*r/87.1%
Simplified87.1%
Final simplification78.4%
(FPCore (x y z t a) :precision binary64 (+ x (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + (t * ((y - z) / (a - z)));
}
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 + (t * ((y - z) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (t * ((y - z) / (a - z)));
}
def code(x, y, z, t, a): return x + (t * ((y - z) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + (t * ((y - z) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + t \cdot \frac{y - z}{a - z}
\end{array}
Initial program 83.8%
associate-*l/98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.2e-57) (+ x t) (if (<= z 1.28e-61) x (+ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.2e-57) {
tmp = x + t;
} else if (z <= 1.28e-61) {
tmp = x;
} else {
tmp = x + t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-4.2d-57)) then
tmp = x + t
else if (z <= 1.28d-61) then
tmp = x
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.2e-57) {
tmp = x + t;
} else if (z <= 1.28e-61) {
tmp = x;
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.2e-57: tmp = x + t elif z <= 1.28e-61: tmp = x else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.2e-57) tmp = Float64(x + t); elseif (z <= 1.28e-61) tmp = x; else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.2e-57) tmp = x + t; elseif (z <= 1.28e-61) tmp = x; else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.2e-57], N[(x + t), $MachinePrecision], If[LessEqual[z, 1.28e-61], x, N[(x + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-57}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 1.28 \cdot 10^{-61}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if z < -4.1999999999999999e-57 or 1.28000000000000009e-61 < z Initial program 79.1%
associate-/l*97.5%
Simplified97.5%
Taylor expanded in z around inf 68.9%
if -4.1999999999999999e-57 < z < 1.28000000000000009e-61Initial program 91.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 54.6%
Final simplification63.5%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 83.8%
associate-/l*98.4%
Simplified98.4%
Taylor expanded in x around inf 51.7%
Final simplification51.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y z) (- a z)) t))))
(if (< t -1.0682974490174067e-39)
t_1
(if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) / (a - z)) * t);
double tmp;
if (t < -1.0682974490174067e-39) {
tmp = t_1;
} else if (t < 3.9110949887586375e-141) {
tmp = x + (((y - z) * t) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (((y - z) / (a - z)) * t)
if (t < (-1.0682974490174067d-39)) then
tmp = t_1
else if (t < 3.9110949887586375d-141) then
tmp = x + (((y - z) * t) / (a - z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) / (a - z)) * t);
double tmp;
if (t < -1.0682974490174067e-39) {
tmp = t_1;
} else if (t < 3.9110949887586375e-141) {
tmp = x + (((y - z) * t) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - z) / (a - z)) * t) tmp = 0 if t < -1.0682974490174067e-39: tmp = t_1 elif t < 3.9110949887586375e-141: tmp = x + (((y - z) * t) / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) / Float64(a - z)) * t)) tmp = 0.0 if (t < -1.0682974490174067e-39) tmp = t_1; elseif (t < 3.9110949887586375e-141) tmp = Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - z) / (a - z)) * t); tmp = 0.0; if (t < -1.0682974490174067e-39) tmp = t_1; elseif (t < 3.9110949887586375e-141) tmp = x + (((y - z) * t) / (a - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.0682974490174067e-39], t$95$1, If[Less[t, 3.9110949887586375e-141], N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - z}{a - z} \cdot t\\
\mathbf{if}\;t < -1.0682974490174067 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t < 3.9110949887586375 \cdot 10^{-141}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023195
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(if (< t -1.0682974490174067e-39) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t))))
(+ x (/ (* (- y z) t) (- a z))))