
(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 (if (<= (/ (* (- y z) t) (- a z)) 3e-203) (+ x (* t (/ (- y z) (- a z)))) (+ x (/ (- y z) (/ (- a z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((((y - z) * t) / (a - z)) <= 3e-203) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = x + ((y - z) / ((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 ((((y - z) * t) / (a - z)) <= 3d-203) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = x + ((y - z) / ((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 ((((y - z) * t) / (a - z)) <= 3e-203) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = x + ((y - z) / ((a - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (((y - z) * t) / (a - z)) <= 3e-203: tmp = x + (t * ((y - z) / (a - z))) else: tmp = x + ((y - z) / ((a - z) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(Float64(Float64(y - z) * t) / Float64(a - z)) <= 3e-203) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((((y - z) * t) / (a - z)) <= 3e-203) tmp = x + (t * ((y - z) / (a - z))); else tmp = x + ((y - z) / ((a - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], 3e-203], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(y - z\right) \cdot t}{a - z} \leq 3 \cdot 10^{-203}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 3.0000000000000001e-203Initial program 84.6%
associate-*l/98.6%
Simplified98.6%
if 3.0000000000000001e-203 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) Initial program 84.2%
associate-/l*99.6%
Simplified99.6%
Final simplification99.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -0.0012)
(+ t x)
(if (<= z 7.5e-81)
(+ x (/ y (/ a t)))
(if (<= z 5e+113) (- x (* t (/ y z))) (+ t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -0.0012) {
tmp = t + x;
} else if (z <= 7.5e-81) {
tmp = x + (y / (a / t));
} else if (z <= 5e+113) {
tmp = x - (t * (y / z));
} else {
tmp = t + 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 (z <= (-0.0012d0)) then
tmp = t + x
else if (z <= 7.5d-81) then
tmp = x + (y / (a / t))
else if (z <= 5d+113) then
tmp = x - (t * (y / z))
else
tmp = t + x
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.0012) {
tmp = t + x;
} else if (z <= 7.5e-81) {
tmp = x + (y / (a / t));
} else if (z <= 5e+113) {
tmp = x - (t * (y / z));
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -0.0012: tmp = t + x elif z <= 7.5e-81: tmp = x + (y / (a / t)) elif z <= 5e+113: tmp = x - (t * (y / z)) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -0.0012) tmp = Float64(t + x); elseif (z <= 7.5e-81) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= 5e+113) tmp = Float64(x - Float64(t * Float64(y / z))); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -0.0012) tmp = t + x; elseif (z <= 7.5e-81) tmp = x + (y / (a / t)); elseif (z <= 5e+113) tmp = x - (t * (y / z)); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -0.0012], N[(t + x), $MachinePrecision], If[LessEqual[z, 7.5e-81], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+113], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0012:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-81}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+113}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -0.00119999999999999989 or 5e113 < z Initial program 68.5%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 82.4%
if -0.00119999999999999989 < z < 7.50000000000000018e-81Initial program 94.8%
associate-*l/94.7%
Simplified94.7%
Taylor expanded in z around 0 74.4%
associate-/l*78.3%
Simplified78.3%
if 7.50000000000000018e-81 < z < 5e113Initial program 95.4%
associate-*l/97.5%
Simplified97.5%
Taylor expanded in y around inf 74.4%
Taylor expanded in a around 0 67.8%
+-commutative67.8%
mul-1-neg67.8%
unsub-neg67.8%
associate-/l*69.9%
associate-/r/67.6%
Simplified67.6%
Final simplification78.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -0.00042)
(+ t x)
(if (<= z 1.85e-78)
(+ x (/ y (/ a t)))
(if (<= z 2.2e+112) (- x (/ (* y t) z)) (+ t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -0.00042) {
tmp = t + x;
} else if (z <= 1.85e-78) {
tmp = x + (y / (a / t));
} else if (z <= 2.2e+112) {
tmp = x - ((y * t) / z);
} else {
tmp = t + 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 (z <= (-0.00042d0)) then
tmp = t + x
else if (z <= 1.85d-78) then
tmp = x + (y / (a / t))
else if (z <= 2.2d+112) then
tmp = x - ((y * t) / z)
else
tmp = t + x
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.00042) {
tmp = t + x;
} else if (z <= 1.85e-78) {
tmp = x + (y / (a / t));
} else if (z <= 2.2e+112) {
tmp = x - ((y * t) / z);
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -0.00042: tmp = t + x elif z <= 1.85e-78: tmp = x + (y / (a / t)) elif z <= 2.2e+112: tmp = x - ((y * t) / z) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -0.00042) tmp = Float64(t + x); elseif (z <= 1.85e-78) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= 2.2e+112) tmp = Float64(x - Float64(Float64(y * t) / z)); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -0.00042) tmp = t + x; elseif (z <= 1.85e-78) tmp = x + (y / (a / t)); elseif (z <= 2.2e+112) tmp = x - ((y * t) / z); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -0.00042], N[(t + x), $MachinePrecision], If[LessEqual[z, 1.85e-78], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e+112], N[(x - N[(N[(y * t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00042:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-78}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+112}:\\
\;\;\;\;x - \frac{y \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -4.2000000000000002e-4 or 2.1999999999999999e112 < z Initial program 68.5%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 82.4%
if -4.2000000000000002e-4 < z < 1.85000000000000003e-78Initial program 94.8%
associate-*l/94.7%
Simplified94.7%
Taylor expanded in z around 0 74.4%
associate-/l*78.3%
Simplified78.3%
if 1.85000000000000003e-78 < z < 2.1999999999999999e112Initial program 95.4%
associate-*l/97.5%
Simplified97.5%
Taylor expanded in y around inf 74.4%
Taylor expanded in a around 0 67.8%
+-commutative67.8%
mul-1-neg67.8%
unsub-neg67.8%
associate-/l*69.9%
associate-/r/67.6%
Simplified67.6%
Taylor expanded in y around 0 67.8%
Final simplification78.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.82e-124) (not (<= z 3.3e-80))) (+ x (* t (- 1.0 (/ y z)))) (+ x (/ y (/ a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.82e-124) || !(z <= 3.3e-80)) {
tmp = x + (t * (1.0 - (y / z)));
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.82d-124)) .or. (.not. (z <= 3.3d-80))) then
tmp = x + (t * (1.0d0 - (y / z)))
else
tmp = x + (y / (a / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.82e-124) || !(z <= 3.3e-80)) {
tmp = x + (t * (1.0 - (y / z)));
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.82e-124) or not (z <= 3.3e-80): tmp = x + (t * (1.0 - (y / z))) else: tmp = x + (y / (a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.82e-124) || !(z <= 3.3e-80)) tmp = Float64(x + Float64(t * Float64(1.0 - Float64(y / z)))); else tmp = Float64(x + Float64(y / Float64(a / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.82e-124) || ~((z <= 3.3e-80))) tmp = x + (t * (1.0 - (y / z))); else tmp = x + (y / (a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.82e-124], N[Not[LessEqual[z, 3.3e-80]], $MachinePrecision]], N[(x + N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.82 \cdot 10^{-124} \lor \neg \left(z \leq 3.3 \cdot 10^{-80}\right):\\
\;\;\;\;x + t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if z < -1.82000000000000009e-124 or 3.3e-80 < z Initial program 78.4%
associate-*l/99.3%
Simplified99.3%
clear-num99.3%
associate-/r/99.2%
Applied egg-rr99.2%
Taylor expanded in a around 0 82.8%
div-sub82.8%
sub-neg82.8%
*-inverses82.8%
metadata-eval82.8%
distribute-lft-in82.8%
metadata-eval82.8%
+-commutative82.8%
mul-1-neg82.8%
unsub-neg82.8%
Simplified82.8%
if -1.82000000000000009e-124 < z < 3.3e-80Initial program 95.6%
associate-*l/93.4%
Simplified93.4%
Taylor expanded in z around 0 81.6%
associate-/l*84.5%
Simplified84.5%
Final simplification83.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -0.031) (not (<= z 5.6e+120))) (+ x (* t (- 1.0 (/ y z)))) (+ x (* t (/ y (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -0.031) || !(z <= 5.6e+120)) {
tmp = x + (t * (1.0 - (y / 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 <= (-0.031d0)) .or. (.not. (z <= 5.6d+120))) then
tmp = x + (t * (1.0d0 - (y / 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 <= -0.031) || !(z <= 5.6e+120)) {
tmp = x + (t * (1.0 - (y / z)));
} else {
tmp = x + (t * (y / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -0.031) or not (z <= 5.6e+120): tmp = x + (t * (1.0 - (y / z))) else: tmp = x + (t * (y / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -0.031) || !(z <= 5.6e+120)) tmp = Float64(x + Float64(t * Float64(1.0 - Float64(y / 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 <= -0.031) || ~((z <= 5.6e+120))) tmp = x + (t * (1.0 - (y / z))); else tmp = x + (t * (y / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -0.031], N[Not[LessEqual[z, 5.6e+120]], $MachinePrecision]], N[(x + N[(t * N[(1.0 - N[(y / 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 -0.031 \lor \neg \left(z \leq 5.6 \cdot 10^{+120}\right):\\
\;\;\;\;x + t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if z < -0.031 or 5.6000000000000001e120 < z Initial program 68.2%
associate-*l/99.9%
Simplified99.9%
clear-num99.9%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 91.8%
div-sub91.8%
sub-neg91.8%
*-inverses91.8%
metadata-eval91.8%
distribute-lft-in91.8%
metadata-eval91.8%
+-commutative91.8%
mul-1-neg91.8%
unsub-neg91.8%
Simplified91.8%
if -0.031 < z < 5.6000000000000001e120Initial program 95.0%
associate-*l/95.5%
Simplified95.5%
Taylor expanded in y around inf 83.4%
Final simplification86.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3e-59) (not (<= y 1.45e-113))) (+ x (* t (/ y (- a z)))) (- x (* z (/ t (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3e-59) || !(y <= 1.45e-113)) {
tmp = x + (t * (y / (a - z)));
} 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 <= (-3d-59)) .or. (.not. (y <= 1.45d-113))) then
tmp = x + (t * (y / (a - z)))
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 <= -3e-59) || !(y <= 1.45e-113)) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x - (z * (t / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3e-59) or not (y <= 1.45e-113): tmp = x + (t * (y / (a - z))) else: tmp = x - (z * (t / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3e-59) || !(y <= 1.45e-113)) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); 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 <= -3e-59) || ~((y <= 1.45e-113))) tmp = x + (t * (y / (a - z))); else tmp = x - (z * (t / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3e-59], N[Not[LessEqual[y, 1.45e-113]], $MachinePrecision]], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $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 -3 \cdot 10^{-59} \lor \neg \left(y \leq 1.45 \cdot 10^{-113}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \frac{t}{a - z}\\
\end{array}
\end{array}
if y < -3.0000000000000001e-59 or 1.45000000000000002e-113 < y Initial program 83.6%
associate-*l/97.0%
Simplified97.0%
Taylor expanded in y around inf 85.5%
if -3.0000000000000001e-59 < y < 1.45000000000000002e-113Initial program 85.9%
associate-*l/97.7%
Simplified97.7%
associate-/r/94.6%
div-inv94.4%
associate-/r*97.5%
Applied egg-rr97.5%
Taylor expanded in y around 0 81.7%
+-commutative81.7%
mul-1-neg81.7%
*-commutative81.7%
associate-*r/90.2%
sub-neg90.2%
Simplified90.2%
Final simplification87.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.9e-59) (not (<= y 7.6e-112))) (+ x (* t (/ y (- a z)))) (- x (/ t (+ (/ a z) -1.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.9e-59) || !(y <= 7.6e-112)) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x - (t / ((a / z) + -1.0));
}
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.9d-59)) .or. (.not. (y <= 7.6d-112))) then
tmp = x + (t * (y / (a - z)))
else
tmp = x - (t / ((a / z) + (-1.0d0)))
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.9e-59) || !(y <= 7.6e-112)) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x - (t / ((a / z) + -1.0));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.9e-59) or not (y <= 7.6e-112): tmp = x + (t * (y / (a - z))) else: tmp = x - (t / ((a / z) + -1.0)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.9e-59) || !(y <= 7.6e-112)) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); else tmp = Float64(x - Float64(t / Float64(Float64(a / z) + -1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.9e-59) || ~((y <= 7.6e-112))) tmp = x + (t * (y / (a - z))); else tmp = x - (t / ((a / z) + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.9e-59], N[Not[LessEqual[y, 7.6e-112]], $MachinePrecision]], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t / N[(N[(a / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{-59} \lor \neg \left(y \leq 7.6 \cdot 10^{-112}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{t}{\frac{a}{z} + -1}\\
\end{array}
\end{array}
if y < -1.89999999999999992e-59 or 7.59999999999999989e-112 < y Initial program 83.6%
associate-*l/97.0%
Simplified97.0%
Taylor expanded in y around inf 85.5%
if -1.89999999999999992e-59 < y < 7.59999999999999989e-112Initial program 85.9%
associate-*l/97.7%
Simplified97.7%
Taylor expanded in y around 0 81.7%
+-commutative81.7%
mul-1-neg81.7%
*-commutative81.7%
associate-*r/90.2%
unsub-neg90.2%
associate-*r/81.7%
*-commutative81.7%
associate-/l*94.5%
div-sub94.5%
*-inverses94.5%
Simplified94.5%
Final simplification88.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.15e-59) (not (<= y 3.1e-112))) (+ x (* t (/ y (- a z)))) (- x (* t (/ z (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.15e-59) || !(y <= 3.1e-112)) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x - (t * (z / (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 <= (-1.15d-59)) .or. (.not. (y <= 3.1d-112))) then
tmp = x + (t * (y / (a - z)))
else
tmp = x - (t * (z / (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 <= -1.15e-59) || !(y <= 3.1e-112)) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x - (t * (z / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.15e-59) or not (y <= 3.1e-112): tmp = x + (t * (y / (a - z))) else: tmp = x - (t * (z / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.15e-59) || !(y <= 3.1e-112)) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); else tmp = Float64(x - Float64(t * Float64(z / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.15e-59) || ~((y <= 3.1e-112))) tmp = x + (t * (y / (a - z))); else tmp = x - (t * (z / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.15e-59], N[Not[LessEqual[y, 3.1e-112]], $MachinePrecision]], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t * N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{-59} \lor \neg \left(y \leq 3.1 \cdot 10^{-112}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x - t \cdot \frac{z}{a - z}\\
\end{array}
\end{array}
if y < -1.1499999999999999e-59 or 3.0999999999999998e-112 < y Initial program 83.6%
associate-*l/97.0%
Simplified97.0%
Taylor expanded in y around inf 85.5%
if -1.1499999999999999e-59 < y < 3.0999999999999998e-112Initial program 85.9%
associate-*l/97.7%
Simplified97.7%
Taylor expanded in y around 0 94.5%
neg-mul-194.5%
distribute-neg-frac94.5%
Simplified94.5%
Final simplification88.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -0.0215) (+ x (- t (* t (/ y z)))) (if (<= z 5.6e+120) (+ x (* t (/ y (- a z)))) (+ x (* t (- 1.0 (/ y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -0.0215) {
tmp = x + (t - (t * (y / z)));
} else if (z <= 5.6e+120) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + (t * (1.0 - (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 <= (-0.0215d0)) then
tmp = x + (t - (t * (y / z)))
else if (z <= 5.6d+120) then
tmp = x + (t * (y / (a - z)))
else
tmp = x + (t * (1.0d0 - (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 <= -0.0215) {
tmp = x + (t - (t * (y / z)));
} else if (z <= 5.6e+120) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + (t * (1.0 - (y / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -0.0215: tmp = x + (t - (t * (y / z))) elif z <= 5.6e+120: tmp = x + (t * (y / (a - z))) else: tmp = x + (t * (1.0 - (y / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -0.0215) tmp = Float64(x + Float64(t - Float64(t * Float64(y / z)))); elseif (z <= 5.6e+120) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); else tmp = Float64(x + Float64(t * Float64(1.0 - Float64(y / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -0.0215) tmp = x + (t - (t * (y / z))); elseif (z <= 5.6e+120) tmp = x + (t * (y / (a - z))); else tmp = x + (t * (1.0 - (y / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -0.0215], N[(x + N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.6e+120], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0215:\\
\;\;\;\;x + \left(t - t \cdot \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{+120}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -0.021499999999999998Initial program 74.5%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in a around 0 90.1%
neg-mul-190.1%
distribute-neg-frac90.1%
Simplified90.1%
Taylor expanded in y around 0 82.2%
+-commutative82.2%
mul-1-neg82.2%
unsub-neg82.2%
associate-/l*91.8%
associate-/r/91.8%
Simplified91.8%
if -0.021499999999999998 < z < 5.6000000000000001e120Initial program 95.0%
associate-*l/95.5%
Simplified95.5%
Taylor expanded in y around inf 83.4%
if 5.6000000000000001e120 < z Initial program 59.3%
associate-*l/100.0%
Simplified100.0%
clear-num100.0%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 91.8%
div-sub91.9%
sub-neg91.9%
*-inverses91.9%
metadata-eval91.9%
distribute-lft-in91.9%
metadata-eval91.9%
+-commutative91.9%
mul-1-neg91.9%
unsub-neg91.9%
Simplified91.9%
Final simplification86.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -0.0046) (not (<= z 3.7e-16))) (+ t x) (+ x (/ y (/ a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -0.0046) || !(z <= 3.7e-16)) {
tmp = t + x;
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-0.0046d0)) .or. (.not. (z <= 3.7d-16))) then
tmp = t + x
else
tmp = x + (y / (a / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -0.0046) || !(z <= 3.7e-16)) {
tmp = t + x;
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -0.0046) or not (z <= 3.7e-16): tmp = t + x else: tmp = x + (y / (a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -0.0046) || !(z <= 3.7e-16)) tmp = Float64(t + x); else tmp = Float64(x + Float64(y / Float64(a / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -0.0046) || ~((z <= 3.7e-16))) tmp = t + x; else tmp = x + (y / (a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -0.0046], N[Not[LessEqual[z, 3.7e-16]], $MachinePrecision]], N[(t + x), $MachinePrecision], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0046 \lor \neg \left(z \leq 3.7 \cdot 10^{-16}\right):\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if z < -0.0045999999999999999 or 3.7e-16 < z Initial program 74.6%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 76.3%
if -0.0045999999999999999 < z < 3.7e-16Initial program 94.6%
associate-*l/94.5%
Simplified94.5%
Taylor expanded in z around 0 72.5%
associate-/l*76.8%
Simplified76.8%
Final simplification76.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -0.000155) (+ t x) (if (<= z 1.9e-14) (+ x (* t (/ y a))) (+ t x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -0.000155) {
tmp = t + x;
} else if (z <= 1.9e-14) {
tmp = x + (t * (y / a));
} else {
tmp = t + 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 (z <= (-0.000155d0)) then
tmp = t + x
else if (z <= 1.9d-14) then
tmp = x + (t * (y / a))
else
tmp = t + x
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.000155) {
tmp = t + x;
} else if (z <= 1.9e-14) {
tmp = x + (t * (y / a));
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -0.000155: tmp = t + x elif z <= 1.9e-14: tmp = x + (t * (y / a)) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -0.000155) tmp = Float64(t + x); elseif (z <= 1.9e-14) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -0.000155) tmp = t + x; elseif (z <= 1.9e-14) tmp = x + (t * (y / a)); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -0.000155], N[(t + x), $MachinePrecision], If[LessEqual[z, 1.9e-14], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.000155:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-14}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -1.55e-4 or 1.9000000000000001e-14 < z Initial program 74.6%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 76.3%
if -1.55e-4 < z < 1.9000000000000001e-14Initial program 94.6%
associate-*l/94.5%
Simplified94.5%
Taylor expanded in z around 0 74.6%
Final simplification75.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -0.0002) (+ t x) (if (<= z 7.5e-19) (+ x (* y (/ t a))) (+ t x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -0.0002) {
tmp = t + x;
} else if (z <= 7.5e-19) {
tmp = x + (y * (t / a));
} else {
tmp = t + 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 (z <= (-0.0002d0)) then
tmp = t + x
else if (z <= 7.5d-19) then
tmp = x + (y * (t / a))
else
tmp = t + x
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.0002) {
tmp = t + x;
} else if (z <= 7.5e-19) {
tmp = x + (y * (t / a));
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -0.0002: tmp = t + x elif z <= 7.5e-19: tmp = x + (y * (t / a)) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -0.0002) tmp = Float64(t + x); elseif (z <= 7.5e-19) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -0.0002) tmp = t + x; elseif (z <= 7.5e-19) tmp = x + (y * (t / a)); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -0.0002], N[(t + x), $MachinePrecision], If[LessEqual[z, 7.5e-19], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0002:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-19}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -2.0000000000000001e-4 or 7.49999999999999957e-19 < z Initial program 74.6%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around inf 76.3%
if -2.0000000000000001e-4 < z < 7.49999999999999957e-19Initial program 94.6%
associate-*l/94.5%
Simplified94.5%
Taylor expanded in z around 0 72.5%
associate-/l*76.8%
Simplified76.8%
div-inv76.2%
clear-num76.2%
Applied egg-rr76.2%
Final simplification76.3%
(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 84.4%
associate-*l/97.2%
Simplified97.2%
Final simplification97.2%
(FPCore (x y z t a) :precision binary64 (if (<= y 4.6e+101) (+ t x) (* t (- 1.0 (/ y z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 4.6e+101) {
tmp = t + x;
} else {
tmp = t * (1.0 - (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 (y <= 4.6d+101) then
tmp = t + x
else
tmp = t * (1.0d0 - (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 (y <= 4.6e+101) {
tmp = t + x;
} else {
tmp = t * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 4.6e+101: tmp = t + x else: tmp = t * (1.0 - (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 4.6e+101) tmp = Float64(t + x); else tmp = Float64(t * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 4.6e+101) tmp = t + x; else tmp = t * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 4.6e+101], N[(t + x), $MachinePrecision], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.6 \cdot 10^{+101}:\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if y < 4.6000000000000003e101Initial program 84.4%
associate-*l/97.2%
Simplified97.2%
Taylor expanded in z around inf 63.8%
if 4.6000000000000003e101 < y Initial program 84.5%
associate-/l*95.4%
Simplified95.4%
Taylor expanded in a around 0 75.0%
neg-mul-175.0%
distribute-neg-frac75.0%
Simplified75.0%
Taylor expanded in t around -inf 55.2%
mul-1-neg55.2%
*-commutative55.2%
distribute-rgt-neg-in55.2%
mul-1-neg55.2%
sub-neg55.2%
metadata-eval55.2%
distribute-lft-in55.2%
metadata-eval55.2%
+-commutative55.2%
mul-1-neg55.2%
unsub-neg55.2%
Simplified55.2%
Final simplification62.4%
(FPCore (x y z t a) :precision binary64 (if (<= y 2.3e+150) (+ t x) (* t (/ (- y) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 2.3e+150) {
tmp = t + x;
} else {
tmp = 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 (y <= 2.3d+150) then
tmp = t + x
else
tmp = 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 (y <= 2.3e+150) {
tmp = t + x;
} else {
tmp = t * (-y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 2.3e+150: tmp = t + x else: tmp = t * (-y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 2.3e+150) tmp = Float64(t + x); else tmp = Float64(t * Float64(Float64(-y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 2.3e+150) tmp = t + x; else tmp = t * (-y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 2.3e+150], N[(t + x), $MachinePrecision], N[(t * N[((-y) / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.3 \cdot 10^{+150}:\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{-y}{z}\\
\end{array}
\end{array}
if y < 2.30000000000000001e150Initial program 83.4%
associate-*l/97.3%
Simplified97.3%
Taylor expanded in z around inf 62.6%
if 2.30000000000000001e150 < y Initial program 91.6%
associate-/l*94.1%
Simplified94.1%
Taylor expanded in a around 0 79.5%
neg-mul-179.5%
distribute-neg-frac79.5%
Simplified79.5%
Taylor expanded in t around -inf 56.7%
mul-1-neg56.7%
*-commutative56.7%
distribute-rgt-neg-in56.7%
mul-1-neg56.7%
sub-neg56.7%
metadata-eval56.7%
distribute-lft-in56.7%
metadata-eval56.7%
+-commutative56.7%
mul-1-neg56.7%
unsub-neg56.7%
Simplified56.7%
Taylor expanded in y around inf 55.5%
mul-1-neg55.5%
associate-*l/56.4%
distribute-rgt-neg-in56.4%
Simplified56.4%
Final simplification61.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -6.5e-174) (+ t x) (if (<= z 1.5e-145) x (+ t x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e-174) {
tmp = t + x;
} else if (z <= 1.5e-145) {
tmp = x;
} else {
tmp = t + 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 (z <= (-6.5d-174)) then
tmp = t + x
else if (z <= 1.5d-145) then
tmp = x
else
tmp = t + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e-174) {
tmp = t + x;
} else if (z <= 1.5e-145) {
tmp = x;
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.5e-174: tmp = t + x elif z <= 1.5e-145: tmp = x else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.5e-174) tmp = Float64(t + x); elseif (z <= 1.5e-145) tmp = x; else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.5e-174) tmp = t + x; elseif (z <= 1.5e-145) tmp = x; else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.5e-174], N[(t + x), $MachinePrecision], If[LessEqual[z, 1.5e-145], x, N[(t + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{-174}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-145}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
\end{array}
if z < -6.50000000000000009e-174 or 1.49999999999999996e-145 < z Initial program 80.0%
associate-*l/98.3%
Simplified98.3%
Taylor expanded in z around inf 64.8%
if -6.50000000000000009e-174 < z < 1.49999999999999996e-145Initial program 97.0%
associate-*l/94.1%
Simplified94.1%
Taylor expanded in x around inf 53.6%
Final simplification61.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -6.5e+17) t x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.5e+17) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-6.5d+17)) then
tmp = t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.5e+17) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.5e+17: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.5e+17) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6.5e+17) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.5e+17], t, x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+17}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -6.5e17Initial program 69.1%
associate-/l*94.5%
Simplified94.5%
Taylor expanded in a around 0 62.5%
neg-mul-162.5%
distribute-neg-frac62.5%
Simplified62.5%
Taylor expanded in t around -inf 60.2%
mul-1-neg60.2%
*-commutative60.2%
distribute-rgt-neg-in60.2%
mul-1-neg60.2%
sub-neg60.2%
metadata-eval60.2%
distribute-lft-in60.2%
metadata-eval60.2%
+-commutative60.2%
mul-1-neg60.2%
unsub-neg60.2%
Simplified60.2%
Taylor expanded in y around 0 39.2%
if -6.5e17 < t Initial program 90.5%
associate-*l/96.7%
Simplified96.7%
Taylor expanded in x around inf 58.9%
Final simplification53.3%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 84.4%
associate-*l/97.2%
Simplified97.2%
Taylor expanded in x around inf 47.1%
Final simplification47.1%
(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 2023192
(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))))