
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- a t) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y / ((a - t) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((a - t) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((a - t) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{a - t}{z - t}}
\end{array}
Initial program 86.0%
associate-/l*98.8%
Simplified98.8%
clear-num98.7%
un-div-inv98.8%
Applied egg-rr98.8%
Final simplification98.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z (- a t)))))
(if (<= a -9.6e-195)
(+ x y)
(if (<= a -1.55e-221)
t_1
(if (<= a -7e-253)
(+ x y)
(if (<= a 4.8e-276) t_1 (if (<= a 1.25e+126) (+ x y) x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / (a - t));
double tmp;
if (a <= -9.6e-195) {
tmp = x + y;
} else if (a <= -1.55e-221) {
tmp = t_1;
} else if (a <= -7e-253) {
tmp = x + y;
} else if (a <= 4.8e-276) {
tmp = t_1;
} else if (a <= 1.25e+126) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (z / (a - t))
if (a <= (-9.6d-195)) then
tmp = x + y
else if (a <= (-1.55d-221)) then
tmp = t_1
else if (a <= (-7d-253)) then
tmp = x + y
else if (a <= 4.8d-276) then
tmp = t_1
else if (a <= 1.25d+126) then
tmp = x + y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / (a - t));
double tmp;
if (a <= -9.6e-195) {
tmp = x + y;
} else if (a <= -1.55e-221) {
tmp = t_1;
} else if (a <= -7e-253) {
tmp = x + y;
} else if (a <= 4.8e-276) {
tmp = t_1;
} else if (a <= 1.25e+126) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / (a - t)) tmp = 0 if a <= -9.6e-195: tmp = x + y elif a <= -1.55e-221: tmp = t_1 elif a <= -7e-253: tmp = x + y elif a <= 4.8e-276: tmp = t_1 elif a <= 1.25e+126: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / Float64(a - t))) tmp = 0.0 if (a <= -9.6e-195) tmp = Float64(x + y); elseif (a <= -1.55e-221) tmp = t_1; elseif (a <= -7e-253) tmp = Float64(x + y); elseif (a <= 4.8e-276) tmp = t_1; elseif (a <= 1.25e+126) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z / (a - t)); tmp = 0.0; if (a <= -9.6e-195) tmp = x + y; elseif (a <= -1.55e-221) tmp = t_1; elseif (a <= -7e-253) tmp = x + y; elseif (a <= 4.8e-276) tmp = t_1; elseif (a <= 1.25e+126) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9.6e-195], N[(x + y), $MachinePrecision], If[LessEqual[a, -1.55e-221], t$95$1, If[LessEqual[a, -7e-253], N[(x + y), $MachinePrecision], If[LessEqual[a, 4.8e-276], t$95$1, If[LessEqual[a, 1.25e+126], N[(x + y), $MachinePrecision], x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{a - t}\\
\mathbf{if}\;a \leq -9.6 \cdot 10^{-195}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -1.55 \cdot 10^{-221}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -7 \cdot 10^{-253}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-276}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{+126}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -9.6e-195 or -1.55e-221 < a < -7.00000000000000045e-253 or 4.79999999999999965e-276 < a < 1.24999999999999994e126Initial program 85.8%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in t around inf 65.1%
+-commutative65.1%
Simplified65.1%
if -9.6e-195 < a < -1.55e-221 or -7.00000000000000045e-253 < a < 4.79999999999999965e-276Initial program 87.7%
associate-/l*92.0%
Simplified92.0%
Taylor expanded in y around inf 92.0%
associate--l+92.0%
div-sub92.0%
Simplified92.0%
Taylor expanded in z around inf 73.6%
if 1.24999999999999994e126 < a Initial program 86.4%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 83.4%
Final simplification68.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.4e+46)
(+ x y)
(if (<= t -2.9e-35)
(- x (* t (/ y a)))
(if (or (<= t -1.2e-119) (not (<= t 3.5e+93)))
(+ x y)
(+ x (* y (/ z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.4e+46) {
tmp = x + y;
} else if (t <= -2.9e-35) {
tmp = x - (t * (y / a));
} else if ((t <= -1.2e-119) || !(t <= 3.5e+93)) {
tmp = x + y;
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-2.4d+46)) then
tmp = x + y
else if (t <= (-2.9d-35)) then
tmp = x - (t * (y / a))
else if ((t <= (-1.2d-119)) .or. (.not. (t <= 3.5d+93))) then
tmp = x + y
else
tmp = x + (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.4e+46) {
tmp = x + y;
} else if (t <= -2.9e-35) {
tmp = x - (t * (y / a));
} else if ((t <= -1.2e-119) || !(t <= 3.5e+93)) {
tmp = x + y;
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.4e+46: tmp = x + y elif t <= -2.9e-35: tmp = x - (t * (y / a)) elif (t <= -1.2e-119) or not (t <= 3.5e+93): tmp = x + y else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.4e+46) tmp = Float64(x + y); elseif (t <= -2.9e-35) tmp = Float64(x - Float64(t * Float64(y / a))); elseif ((t <= -1.2e-119) || !(t <= 3.5e+93)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.4e+46) tmp = x + y; elseif (t <= -2.9e-35) tmp = x - (t * (y / a)); elseif ((t <= -1.2e-119) || ~((t <= 3.5e+93))) tmp = x + y; else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.4e+46], N[(x + y), $MachinePrecision], If[LessEqual[t, -2.9e-35], N[(x - N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -1.2e-119], N[Not[LessEqual[t, 3.5e+93]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+46}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -2.9 \cdot 10^{-35}:\\
\;\;\;\;x - t \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{-119} \lor \neg \left(t \leq 3.5 \cdot 10^{+93}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -2.40000000000000008e46 or -2.9000000000000002e-35 < t < -1.20000000000000004e-119 or 3.49999999999999998e93 < t Initial program 76.0%
associate-/l*99.0%
Simplified99.0%
Taylor expanded in t around inf 72.3%
+-commutative72.3%
Simplified72.3%
if -2.40000000000000008e46 < t < -2.9000000000000002e-35Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
clear-num99.6%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 92.7%
mul-1-neg92.7%
unsub-neg92.7%
associate-/l*92.5%
Simplified92.5%
Taylor expanded in t around 0 85.5%
associate-/l*85.4%
Simplified85.4%
if -1.20000000000000004e-119 < t < 3.49999999999999998e93Initial program 92.8%
associate-/l*98.5%
Simplified98.5%
Taylor expanded in t around 0 72.0%
+-commutative72.0%
associate-/l*76.9%
Simplified76.9%
Final simplification75.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y (/ z t)))))
(if (<= t -1.7e+104)
(+ x y)
(if (<= t -3.5e-137)
t_1
(if (<= t 2.1e-48)
(+ x (* y (/ z a)))
(if (<= t 8.2e+128) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (z / t));
double tmp;
if (t <= -1.7e+104) {
tmp = x + y;
} else if (t <= -3.5e-137) {
tmp = t_1;
} else if (t <= 2.1e-48) {
tmp = x + (y * (z / a));
} else if (t <= 8.2e+128) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (y * (z / t))
if (t <= (-1.7d+104)) then
tmp = x + y
else if (t <= (-3.5d-137)) then
tmp = t_1
else if (t <= 2.1d-48) then
tmp = x + (y * (z / a))
else if (t <= 8.2d+128) then
tmp = t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (z / t));
double tmp;
if (t <= -1.7e+104) {
tmp = x + y;
} else if (t <= -3.5e-137) {
tmp = t_1;
} else if (t <= 2.1e-48) {
tmp = x + (y * (z / a));
} else if (t <= 8.2e+128) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * (z / t)) tmp = 0 if t <= -1.7e+104: tmp = x + y elif t <= -3.5e-137: tmp = t_1 elif t <= 2.1e-48: tmp = x + (y * (z / a)) elif t <= 8.2e+128: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * Float64(z / t))) tmp = 0.0 if (t <= -1.7e+104) tmp = Float64(x + y); elseif (t <= -3.5e-137) tmp = t_1; elseif (t <= 2.1e-48) tmp = Float64(x + Float64(y * Float64(z / a))); elseif (t <= 8.2e+128) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * (z / t)); tmp = 0.0; if (t <= -1.7e+104) tmp = x + y; elseif (t <= -3.5e-137) tmp = t_1; elseif (t <= 2.1e-48) tmp = x + (y * (z / a)); elseif (t <= 8.2e+128) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e+104], N[(x + y), $MachinePrecision], If[LessEqual[t, -3.5e-137], t$95$1, If[LessEqual[t, 2.1e-48], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.2e+128], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{+104}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-137}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-48}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.6999999999999998e104 or 8.20000000000000023e128 < t Initial program 68.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 81.0%
+-commutative81.0%
Simplified81.0%
if -1.6999999999999998e104 < t < -3.5000000000000001e-137 or 2.09999999999999989e-48 < t < 8.20000000000000023e128Initial program 92.7%
associate-/l*98.8%
Simplified98.8%
Taylor expanded in z around inf 81.7%
Taylor expanded in a around 0 72.2%
mul-1-neg72.2%
unsub-neg72.2%
associate-/l*73.2%
Simplified73.2%
if -3.5000000000000001e-137 < t < 2.09999999999999989e-48Initial program 92.8%
associate-/l*97.8%
Simplified97.8%
Taylor expanded in t around 0 77.6%
+-commutative77.6%
associate-/l*83.5%
Simplified83.5%
Final simplification79.2%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.25e+102)
(+ x y)
(if (<= t -1.35e-145)
(- x (* z (/ y t)))
(if (<= t 1.9e-46)
(+ x (* y (/ z a)))
(if (<= t 1.35e+129) (- x (* y (/ z t))) (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.25e+102) {
tmp = x + y;
} else if (t <= -1.35e-145) {
tmp = x - (z * (y / t));
} else if (t <= 1.9e-46) {
tmp = x + (y * (z / a));
} else if (t <= 1.35e+129) {
tmp = x - (y * (z / t));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.25d+102)) then
tmp = x + y
else if (t <= (-1.35d-145)) then
tmp = x - (z * (y / t))
else if (t <= 1.9d-46) then
tmp = x + (y * (z / a))
else if (t <= 1.35d+129) then
tmp = x - (y * (z / t))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.25e+102) {
tmp = x + y;
} else if (t <= -1.35e-145) {
tmp = x - (z * (y / t));
} else if (t <= 1.9e-46) {
tmp = x + (y * (z / a));
} else if (t <= 1.35e+129) {
tmp = x - (y * (z / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.25e+102: tmp = x + y elif t <= -1.35e-145: tmp = x - (z * (y / t)) elif t <= 1.9e-46: tmp = x + (y * (z / a)) elif t <= 1.35e+129: tmp = x - (y * (z / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.25e+102) tmp = Float64(x + y); elseif (t <= -1.35e-145) tmp = Float64(x - Float64(z * Float64(y / t))); elseif (t <= 1.9e-46) tmp = Float64(x + Float64(y * Float64(z / a))); elseif (t <= 1.35e+129) tmp = Float64(x - Float64(y * Float64(z / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.25e+102) tmp = x + y; elseif (t <= -1.35e-145) tmp = x - (z * (y / t)); elseif (t <= 1.9e-46) tmp = x + (y * (z / a)); elseif (t <= 1.35e+129) tmp = x - (y * (z / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.25e+102], N[(x + y), $MachinePrecision], If[LessEqual[t, -1.35e-145], N[(x - N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-46], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e+129], N[(x - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.25 \cdot 10^{+102}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-145}:\\
\;\;\;\;x - z \cdot \frac{y}{t}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-46}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+129}:\\
\;\;\;\;x - y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.25e102 or 1.35e129 < t Initial program 68.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 81.0%
+-commutative81.0%
Simplified81.0%
if -1.25e102 < t < -1.35e-145Initial program 95.7%
associate-/l*97.6%
Simplified97.6%
Taylor expanded in z around inf 80.2%
Taylor expanded in a around 0 71.4%
mul-1-neg71.4%
unsub-neg71.4%
associate-/l*69.3%
Simplified69.3%
Taylor expanded in y around 0 71.4%
*-rgt-identity71.4%
times-frac71.7%
/-rgt-identity71.7%
associate-/r/69.8%
Simplified69.8%
associate-/r/71.7%
Applied egg-rr71.7%
if -1.35e-145 < t < 1.8999999999999998e-46Initial program 92.8%
associate-/l*97.8%
Simplified97.8%
Taylor expanded in t around 0 77.6%
+-commutative77.6%
associate-/l*83.5%
Simplified83.5%
if 1.8999999999999998e-46 < t < 1.35e129Initial program 89.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 83.1%
Taylor expanded in a around 0 72.9%
mul-1-neg72.9%
unsub-neg72.9%
associate-/l*76.9%
Simplified76.9%
Final simplification79.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -2.1e-60) (not (<= x 3e-182))) (+ x (* z (/ y (- a t)))) (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.1e-60) || !(x <= 3e-182)) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = y * ((z - t) / (a - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-2.1d-60)) .or. (.not. (x <= 3d-182))) then
tmp = x + (z * (y / (a - t)))
else
tmp = y * ((z - t) / (a - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.1e-60) || !(x <= 3e-182)) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = y * ((z - t) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -2.1e-60) or not (x <= 3e-182): tmp = x + (z * (y / (a - t))) else: tmp = y * ((z - t) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -2.1e-60) || !(x <= 3e-182)) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); else tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -2.1e-60) || ~((x <= 3e-182))) tmp = x + (z * (y / (a - t))); else tmp = y * ((z - t) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -2.1e-60], N[Not[LessEqual[x, 3e-182]], $MachinePrecision]], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{-60} \lor \neg \left(x \leq 3 \cdot 10^{-182}\right):\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\end{array}
\end{array}
if x < -2.09999999999999991e-60 or 3.0000000000000001e-182 < x Initial program 88.0%
associate-/l*98.8%
Simplified98.8%
Taylor expanded in z around inf 83.7%
div-inv83.7%
*-commutative83.7%
associate-*l*89.1%
div-inv89.2%
Applied egg-rr89.2%
if -2.09999999999999991e-60 < x < 3.0000000000000001e-182Initial program 81.9%
associate-/l*98.7%
Simplified98.7%
Taylor expanded in y around inf 98.6%
associate--l+98.6%
div-sub98.6%
Simplified98.6%
Taylor expanded in x around 0 80.4%
div-sub80.4%
Simplified80.4%
Final simplification86.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.7e+101) (not (<= t 8.2e+122))) (- x (* y (+ (/ z t) -1.0))) (+ x (/ y (/ (- a t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.7e+101) || !(t <= 8.2e+122)) {
tmp = x - (y * ((z / t) + -1.0));
} else {
tmp = x + (y / ((a - t) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-3.7d+101)) .or. (.not. (t <= 8.2d+122))) then
tmp = x - (y * ((z / t) + (-1.0d0)))
else
tmp = x + (y / ((a - t) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.7e+101) || !(t <= 8.2e+122)) {
tmp = x - (y * ((z / t) + -1.0));
} else {
tmp = x + (y / ((a - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.7e+101) or not (t <= 8.2e+122): tmp = x - (y * ((z / t) + -1.0)) else: tmp = x + (y / ((a - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.7e+101) || !(t <= 8.2e+122)) tmp = Float64(x - Float64(y * Float64(Float64(z / t) + -1.0))); else tmp = Float64(x + Float64(y / Float64(Float64(a - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.7e+101) || ~((t <= 8.2e+122))) tmp = x - (y * ((z / t) + -1.0)); else tmp = x + (y / ((a - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.7e+101], N[Not[LessEqual[t, 8.2e+122]], $MachinePrecision]], N[(x - N[(y * N[(N[(z / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{+101} \lor \neg \left(t \leq 8.2 \cdot 10^{+122}\right):\\
\;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\
\end{array}
\end{array}
if t < -3.6999999999999997e101 or 8.2000000000000004e122 < t Initial program 69.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 65.4%
mul-1-neg65.4%
unsub-neg65.4%
associate-/l*93.1%
div-sub93.0%
sub-neg93.0%
*-inverses93.0%
metadata-eval93.0%
Simplified93.0%
if -3.6999999999999997e101 < t < 8.2000000000000004e122Initial program 92.7%
associate-/l*98.3%
Simplified98.3%
clear-num98.3%
un-div-inv98.4%
Applied egg-rr98.4%
Taylor expanded in z around inf 87.8%
Final simplification89.3%
(FPCore (x y z t a) :precision binary64 (if (<= x -2.3e-60) (+ x (* y (/ z a))) (if (<= x 2.25e-7) (* y (/ (- z t) (- a t))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.3e-60) {
tmp = x + (y * (z / a));
} else if (x <= 2.25e-7) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-2.3d-60)) then
tmp = x + (y * (z / a))
else if (x <= 2.25d-7) then
tmp = y * ((z - t) / (a - t))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.3e-60) {
tmp = x + (y * (z / a));
} else if (x <= 2.25e-7) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -2.3e-60: tmp = x + (y * (z / a)) elif x <= 2.25e-7: tmp = y * ((z - t) / (a - t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2.3e-60) tmp = Float64(x + Float64(y * Float64(z / a))); elseif (x <= 2.25e-7) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -2.3e-60) tmp = x + (y * (z / a)); elseif (x <= 2.25e-7) tmp = y * ((z - t) / (a - t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.3e-60], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.25e-7], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{-60}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{elif}\;x \leq 2.25 \cdot 10^{-7}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if x < -2.3000000000000001e-60Initial program 87.1%
associate-/l*97.4%
Simplified97.4%
Taylor expanded in t around 0 70.0%
+-commutative70.0%
associate-/l*76.2%
Simplified76.2%
if -2.3000000000000001e-60 < x < 2.2499999999999999e-7Initial program 83.0%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in y around inf 98.9%
associate--l+98.9%
div-sub98.9%
Simplified98.9%
Taylor expanded in x around 0 77.5%
div-sub77.5%
Simplified77.5%
if 2.2499999999999999e-7 < x Initial program 89.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 76.5%
+-commutative76.5%
Simplified76.5%
Final simplification76.9%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.8e-60) (+ x (* z (/ y (- a t)))) (if (<= x 3.5e-182) (* y (/ (- z t) (- a t))) (+ x (/ y (/ (- a t) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.8e-60) {
tmp = x + (z * (y / (a - t)));
} else if (x <= 3.5e-182) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (y / ((a - t) / 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 (x <= (-1.8d-60)) then
tmp = x + (z * (y / (a - t)))
else if (x <= 3.5d-182) then
tmp = y * ((z - t) / (a - t))
else
tmp = x + (y / ((a - t) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.8e-60) {
tmp = x + (z * (y / (a - t)));
} else if (x <= 3.5e-182) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (y / ((a - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.8e-60: tmp = x + (z * (y / (a - t))) elif x <= 3.5e-182: tmp = y * ((z - t) / (a - t)) else: tmp = x + (y / ((a - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.8e-60) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); elseif (x <= 3.5e-182) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x + Float64(y / Float64(Float64(a - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.8e-60) tmp = x + (z * (y / (a - t))); elseif (x <= 3.5e-182) tmp = y * ((z - t) / (a - t)); else tmp = x + (y / ((a - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.8e-60], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e-182], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{-60}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-182}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\
\end{array}
\end{array}
if x < -1.8e-60Initial program 87.1%
associate-/l*97.4%
Simplified97.4%
Taylor expanded in z around inf 83.1%
div-inv83.1%
*-commutative83.1%
associate-*l*93.3%
div-inv93.3%
Applied egg-rr93.3%
if -1.8e-60 < x < 3.49999999999999983e-182Initial program 81.9%
associate-/l*98.7%
Simplified98.7%
Taylor expanded in y around inf 98.6%
associate--l+98.6%
div-sub98.6%
Simplified98.6%
Taylor expanded in x around 0 80.4%
div-sub80.4%
Simplified80.4%
if 3.49999999999999983e-182 < x Initial program 88.6%
associate-/l*99.8%
Simplified99.8%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around inf 88.0%
Final simplification87.1%
(FPCore (x y z t a) :precision binary64 (if (<= x -5.7e-127) (+ x (/ z (/ (- a t) y))) (if (<= x 2.2e-180) (* y (/ (- z t) (- a t))) (+ x (/ y (/ (- a t) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5.7e-127) {
tmp = x + (z / ((a - t) / y));
} else if (x <= 2.2e-180) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (y / ((a - t) / 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 (x <= (-5.7d-127)) then
tmp = x + (z / ((a - t) / y))
else if (x <= 2.2d-180) then
tmp = y * ((z - t) / (a - t))
else
tmp = x + (y / ((a - t) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5.7e-127) {
tmp = x + (z / ((a - t) / y));
} else if (x <= 2.2e-180) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (y / ((a - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -5.7e-127: tmp = x + (z / ((a - t) / y)) elif x <= 2.2e-180: tmp = y * ((z - t) / (a - t)) else: tmp = x + (y / ((a - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -5.7e-127) tmp = Float64(x + Float64(z / Float64(Float64(a - t) / y))); elseif (x <= 2.2e-180) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x + Float64(y / Float64(Float64(a - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -5.7e-127) tmp = x + (z / ((a - t) / y)); elseif (x <= 2.2e-180) tmp = y * ((z - t) / (a - t)); else tmp = x + (y / ((a - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -5.7e-127], N[(x + N[(z / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.2e-180], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.7 \cdot 10^{-127}:\\
\;\;\;\;x + \frac{z}{\frac{a - t}{y}}\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-180}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\
\end{array}
\end{array}
if x < -5.69999999999999963e-127Initial program 85.4%
associate-/l*97.8%
Simplified97.8%
Taylor expanded in z around inf 80.1%
div-inv80.0%
*-commutative80.0%
associate-*l*88.9%
div-inv88.9%
Applied egg-rr88.9%
clear-num88.9%
un-div-inv89.8%
Applied egg-rr89.8%
if -5.69999999999999963e-127 < x < 2.20000000000000013e-180Initial program 82.9%
associate-/l*98.4%
Simplified98.4%
Taylor expanded in y around inf 98.4%
associate--l+98.4%
div-sub98.4%
Simplified98.4%
Taylor expanded in x around 0 82.6%
div-sub82.6%
Simplified82.6%
if 2.20000000000000013e-180 < x Initial program 88.6%
associate-/l*99.8%
Simplified99.8%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around inf 88.0%
Final simplification87.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.3e-44) (+ x (* z (/ y (- a t)))) (if (<= z 4.7e-107) (+ x (* t (/ y (- t a)))) (+ x (/ y (/ (- a t) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.3e-44) {
tmp = x + (z * (y / (a - t)));
} else if (z <= 4.7e-107) {
tmp = x + (t * (y / (t - a)));
} else {
tmp = x + (y / ((a - t) / 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 <= (-4.3d-44)) then
tmp = x + (z * (y / (a - t)))
else if (z <= 4.7d-107) then
tmp = x + (t * (y / (t - a)))
else
tmp = x + (y / ((a - t) / 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 <= -4.3e-44) {
tmp = x + (z * (y / (a - t)));
} else if (z <= 4.7e-107) {
tmp = x + (t * (y / (t - a)));
} else {
tmp = x + (y / ((a - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.3e-44: tmp = x + (z * (y / (a - t))) elif z <= 4.7e-107: tmp = x + (t * (y / (t - a))) else: tmp = x + (y / ((a - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.3e-44) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); elseif (z <= 4.7e-107) tmp = Float64(x + Float64(t * Float64(y / Float64(t - a)))); else tmp = Float64(x + Float64(y / Float64(Float64(a - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.3e-44) tmp = x + (z * (y / (a - t))); elseif (z <= 4.7e-107) tmp = x + (t * (y / (t - a))); else tmp = x + (y / ((a - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.3e-44], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.7e-107], N[(x + N[(t * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{-44}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-107}:\\
\;\;\;\;x + t \cdot \frac{y}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\
\end{array}
\end{array}
if z < -4.30000000000000013e-44Initial program 82.4%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in z around inf 77.4%
div-inv77.3%
*-commutative77.3%
associate-*l*89.0%
div-inv89.0%
Applied egg-rr89.0%
if -4.30000000000000013e-44 < z < 4.69999999999999998e-107Initial program 91.0%
associate-/l*100.0%
Simplified100.0%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 85.1%
mul-1-neg85.1%
unsub-neg85.1%
associate-/l*91.3%
Simplified91.3%
if 4.69999999999999998e-107 < z Initial program 83.0%
associate-/l*98.6%
Simplified98.6%
clear-num98.6%
un-div-inv98.5%
Applied egg-rr98.5%
Taylor expanded in z around inf 84.9%
Final simplification88.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.3e-44) (+ x (* z (/ y (- a t)))) (if (<= z 5e-107) (+ x (* y (/ t (- t a)))) (+ x (/ y (/ (- a t) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.3e-44) {
tmp = x + (z * (y / (a - t)));
} else if (z <= 5e-107) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = x + (y / ((a - t) / 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 <= (-4.3d-44)) then
tmp = x + (z * (y / (a - t)))
else if (z <= 5d-107) then
tmp = x + (y * (t / (t - a)))
else
tmp = x + (y / ((a - t) / 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 <= -4.3e-44) {
tmp = x + (z * (y / (a - t)));
} else if (z <= 5e-107) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = x + (y / ((a - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.3e-44: tmp = x + (z * (y / (a - t))) elif z <= 5e-107: tmp = x + (y * (t / (t - a))) else: tmp = x + (y / ((a - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.3e-44) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); elseif (z <= 5e-107) tmp = Float64(x + Float64(y * Float64(t / Float64(t - a)))); else tmp = Float64(x + Float64(y / Float64(Float64(a - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.3e-44) tmp = x + (z * (y / (a - t))); elseif (z <= 5e-107) tmp = x + (y * (t / (t - a))); else tmp = x + (y / ((a - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.3e-44], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-107], N[(x + N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{-44}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-107}:\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\
\end{array}
\end{array}
if z < -4.30000000000000013e-44Initial program 82.4%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in z around inf 77.4%
div-inv77.3%
*-commutative77.3%
associate-*l*89.0%
div-inv89.0%
Applied egg-rr89.0%
if -4.30000000000000013e-44 < z < 4.99999999999999971e-107Initial program 91.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around 0 85.1%
mul-1-neg85.1%
unsub-neg85.1%
*-commutative85.1%
associate-/l*94.1%
Simplified94.1%
if 4.99999999999999971e-107 < z Initial program 83.0%
associate-/l*98.6%
Simplified98.6%
clear-num98.6%
un-div-inv98.5%
Applied egg-rr98.5%
Taylor expanded in z around inf 84.9%
Final simplification89.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.2e-119) (not (<= t 1.8e+93))) (+ x y) (+ x (/ (* y z) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.2e-119) || !(t <= 1.8e+93)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.2d-119)) .or. (.not. (t <= 1.8d+93))) then
tmp = x + y
else
tmp = x + ((y * z) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.2e-119) || !(t <= 1.8e+93)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.2e-119) or not (t <= 1.8e+93): tmp = x + y else: tmp = x + ((y * z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.2e-119) || !(t <= 1.8e+93)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(y * z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.2e-119) || ~((t <= 1.8e+93))) tmp = x + y; else tmp = x + ((y * z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.2e-119], N[Not[LessEqual[t, 1.8e+93]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-119} \lor \neg \left(t \leq 1.8 \cdot 10^{+93}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\end{array}
\end{array}
if t < -1.20000000000000004e-119 or 1.8e93 < t Initial program 78.6%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in t around inf 69.8%
+-commutative69.8%
Simplified69.8%
if -1.20000000000000004e-119 < t < 1.8e93Initial program 92.8%
associate-/l*98.5%
Simplified98.5%
Taylor expanded in t around 0 72.0%
Final simplification71.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.2e-119) (not (<= t 1.8e+93))) (+ x y) (+ x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.2e-119) || !(t <= 1.8e+93)) {
tmp = x + y;
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.2d-119)) .or. (.not. (t <= 1.8d+93))) then
tmp = x + y
else
tmp = x + (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.2e-119) || !(t <= 1.8e+93)) {
tmp = x + y;
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.2e-119) or not (t <= 1.8e+93): tmp = x + y else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.2e-119) || !(t <= 1.8e+93)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.2e-119) || ~((t <= 1.8e+93))) tmp = x + y; else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.2e-119], N[Not[LessEqual[t, 1.8e+93]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-119} \lor \neg \left(t \leq 1.8 \cdot 10^{+93}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -1.20000000000000004e-119 or 1.8e93 < t Initial program 78.6%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in t around inf 69.8%
+-commutative69.8%
Simplified69.8%
if -1.20000000000000004e-119 < t < 1.8e93Initial program 92.8%
associate-/l*98.5%
Simplified98.5%
Taylor expanded in t around 0 72.0%
+-commutative72.0%
associate-/l*76.9%
Simplified76.9%
Final simplification73.5%
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
Initial program 86.0%
associate-/l*98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (x y z t a) :precision binary64 (if (<= a 8e+124) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 8e+124) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= 8d+124) then
tmp = x + y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 8e+124) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= 8e+124: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= 8e+124) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= 8e+124) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, 8e+124], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 8 \cdot 10^{+124}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < 7.99999999999999959e124Initial program 86.0%
associate-/l*98.6%
Simplified98.6%
Taylor expanded in t around inf 60.2%
+-commutative60.2%
Simplified60.2%
if 7.99999999999999959e124 < a Initial program 86.4%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 83.4%
Final simplification63.4%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 86.0%
associate-/l*98.8%
Simplified98.8%
Taylor expanded in x around inf 50.3%
Final simplification50.3%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- a t) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y / ((a - t) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((a - t) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((a - t) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{a - t}{z - t}}
\end{array}
herbie shell --seed 2024066
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:alt
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))