
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
Initial program 84.0%
associate-/l*97.9%
Simplified97.9%
Final simplification97.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- z t) (/ y (- z a)))))
(if (<= z -1.85e+169)
(+ x y)
(if (<= z -5e+65)
(- x (* t (/ y z)))
(if (<= z -1.66e+30)
(+ x y)
(if (<= z -4.5e-133)
t_1
(if (<= z 1.9e-64)
(+ x (/ y (/ a t)))
(if (<= z 3.2e+19)
t_1
(if (<= z 8.6e+67) (- x (/ y (/ a z))) (+ x y))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) * (y / (z - a));
double tmp;
if (z <= -1.85e+169) {
tmp = x + y;
} else if (z <= -5e+65) {
tmp = x - (t * (y / z));
} else if (z <= -1.66e+30) {
tmp = x + y;
} else if (z <= -4.5e-133) {
tmp = t_1;
} else if (z <= 1.9e-64) {
tmp = x + (y / (a / t));
} else if (z <= 3.2e+19) {
tmp = t_1;
} else if (z <= 8.6e+67) {
tmp = x - (y / (a / z));
} 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 = (z - t) * (y / (z - a))
if (z <= (-1.85d+169)) then
tmp = x + y
else if (z <= (-5d+65)) then
tmp = x - (t * (y / z))
else if (z <= (-1.66d+30)) then
tmp = x + y
else if (z <= (-4.5d-133)) then
tmp = t_1
else if (z <= 1.9d-64) then
tmp = x + (y / (a / t))
else if (z <= 3.2d+19) then
tmp = t_1
else if (z <= 8.6d+67) then
tmp = x - (y / (a / z))
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 = (z - t) * (y / (z - a));
double tmp;
if (z <= -1.85e+169) {
tmp = x + y;
} else if (z <= -5e+65) {
tmp = x - (t * (y / z));
} else if (z <= -1.66e+30) {
tmp = x + y;
} else if (z <= -4.5e-133) {
tmp = t_1;
} else if (z <= 1.9e-64) {
tmp = x + (y / (a / t));
} else if (z <= 3.2e+19) {
tmp = t_1;
} else if (z <= 8.6e+67) {
tmp = x - (y / (a / z));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) * (y / (z - a)) tmp = 0 if z <= -1.85e+169: tmp = x + y elif z <= -5e+65: tmp = x - (t * (y / z)) elif z <= -1.66e+30: tmp = x + y elif z <= -4.5e-133: tmp = t_1 elif z <= 1.9e-64: tmp = x + (y / (a / t)) elif z <= 3.2e+19: tmp = t_1 elif z <= 8.6e+67: tmp = x - (y / (a / z)) else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) * Float64(y / Float64(z - a))) tmp = 0.0 if (z <= -1.85e+169) tmp = Float64(x + y); elseif (z <= -5e+65) tmp = Float64(x - Float64(t * Float64(y / z))); elseif (z <= -1.66e+30) tmp = Float64(x + y); elseif (z <= -4.5e-133) tmp = t_1; elseif (z <= 1.9e-64) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= 3.2e+19) tmp = t_1; elseif (z <= 8.6e+67) tmp = Float64(x - Float64(y / Float64(a / z))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) * (y / (z - a)); tmp = 0.0; if (z <= -1.85e+169) tmp = x + y; elseif (z <= -5e+65) tmp = x - (t * (y / z)); elseif (z <= -1.66e+30) tmp = x + y; elseif (z <= -4.5e-133) tmp = t_1; elseif (z <= 1.9e-64) tmp = x + (y / (a / t)); elseif (z <= 3.2e+19) tmp = t_1; elseif (z <= 8.6e+67) tmp = x - (y / (a / z)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.85e+169], N[(x + y), $MachinePrecision], If[LessEqual[z, -5e+65], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.66e+30], N[(x + y), $MachinePrecision], If[LessEqual[z, -4.5e-133], t$95$1, If[LessEqual[z, 1.9e-64], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+19], t$95$1, If[LessEqual[z, 8.6e+67], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{if}\;z \leq -1.85 \cdot 10^{+169}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -5 \cdot 10^{+65}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq -1.66 \cdot 10^{+30}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-133}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-64}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 8.6 \cdot 10^{+67}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.85e169 or -4.99999999999999973e65 < z < -1.66e30 or 8.6000000000000002e67 < z Initial program 70.5%
associate-*l/91.3%
Simplified91.3%
Taylor expanded in z around inf 82.8%
if -1.85e169 < z < -4.99999999999999973e65Initial program 70.3%
+-commutative70.3%
associate-*r/99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in t around inf 86.4%
neg-mul-186.4%
distribute-neg-frac86.4%
Simplified86.4%
Taylor expanded in z around inf 65.1%
+-commutative65.1%
mul-1-neg65.1%
unsub-neg65.1%
associate-/l*81.9%
associate-/r/81.9%
Simplified81.9%
if -1.66e30 < z < -4.50000000000000009e-133 or 1.9000000000000001e-64 < z < 3.2e19Initial program 91.5%
associate-*l/97.8%
Simplified97.8%
Taylor expanded in x around 0 68.1%
*-un-lft-identity68.1%
times-frac74.3%
clear-num74.2%
times-frac72.1%
*-un-lft-identity72.1%
associate-/l/74.1%
associate-/r/74.3%
/-rgt-identity74.3%
Applied egg-rr74.3%
if -4.50000000000000009e-133 < z < 1.9000000000000001e-64Initial program 95.8%
associate-*l/93.7%
Simplified93.7%
Taylor expanded in z around 0 81.7%
associate-/l*85.5%
Simplified85.5%
if 3.2e19 < z < 8.6000000000000002e67Initial program 88.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around 0 88.2%
Taylor expanded in z around 0 76.2%
+-commutative76.2%
mul-1-neg76.2%
unsub-neg76.2%
associate-/l*76.2%
Simplified76.2%
Final simplification82.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.15e+166)
(+ x y)
(if (<= z -5.2e+63)
(- x (* t (/ y z)))
(if (or (<= z -1.46e+38) (not (<= z 1.9e+16)))
(+ x y)
(+ x (/ y (/ a t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e+166) {
tmp = x + y;
} else if (z <= -5.2e+63) {
tmp = x - (t * (y / z));
} else if ((z <= -1.46e+38) || !(z <= 1.9e+16)) {
tmp = x + y;
} 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.15d+166)) then
tmp = x + y
else if (z <= (-5.2d+63)) then
tmp = x - (t * (y / z))
else if ((z <= (-1.46d+38)) .or. (.not. (z <= 1.9d+16))) then
tmp = x + y
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.15e+166) {
tmp = x + y;
} else if (z <= -5.2e+63) {
tmp = x - (t * (y / z));
} else if ((z <= -1.46e+38) || !(z <= 1.9e+16)) {
tmp = x + y;
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.15e+166: tmp = x + y elif z <= -5.2e+63: tmp = x - (t * (y / z)) elif (z <= -1.46e+38) or not (z <= 1.9e+16): tmp = x + y else: tmp = x + (y / (a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.15e+166) tmp = Float64(x + y); elseif (z <= -5.2e+63) tmp = Float64(x - Float64(t * Float64(y / z))); elseif ((z <= -1.46e+38) || !(z <= 1.9e+16)) tmp = Float64(x + y); 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.15e+166) tmp = x + y; elseif (z <= -5.2e+63) tmp = x - (t * (y / z)); elseif ((z <= -1.46e+38) || ~((z <= 1.9e+16))) tmp = x + y; else tmp = x + (y / (a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.15e+166], N[(x + y), $MachinePrecision], If[LessEqual[z, -5.2e+63], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.46e+38], N[Not[LessEqual[z, 1.9e+16]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+166}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{+63}:\\
\;\;\;\;x - t \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq -1.46 \cdot 10^{+38} \lor \neg \left(z \leq 1.9 \cdot 10^{+16}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if z < -1.15000000000000004e166 or -5.2000000000000002e63 < z < -1.46000000000000008e38 or 1.9e16 < z Initial program 72.5%
associate-*l/91.8%
Simplified91.8%
Taylor expanded in z around inf 81.8%
if -1.15000000000000004e166 < z < -5.2000000000000002e63Initial program 70.3%
+-commutative70.3%
associate-*r/99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in t around inf 86.4%
neg-mul-186.4%
distribute-neg-frac86.4%
Simplified86.4%
Taylor expanded in z around inf 65.1%
+-commutative65.1%
mul-1-neg65.1%
unsub-neg65.1%
associate-/l*81.9%
associate-/r/81.9%
Simplified81.9%
if -1.46000000000000008e38 < z < 1.9e16Initial program 93.8%
associate-*l/95.1%
Simplified95.1%
Taylor expanded in z around 0 70.3%
associate-/l*74.8%
Simplified74.8%
Final simplification78.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (- 1.0 (/ t z))))))
(if (<= z -3e-30)
t_1
(if (<= z -4.5e-134)
(* (- z t) (/ y (- z a)))
(if (<= z 1.25e-43) (+ x (/ y (/ a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -3e-30) {
tmp = t_1;
} else if (z <= -4.5e-134) {
tmp = (z - t) * (y / (z - a));
} else if (z <= 1.25e-43) {
tmp = x + (y / (a / t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * (1.0d0 - (t / z)))
if (z <= (-3d-30)) then
tmp = t_1
else if (z <= (-4.5d-134)) then
tmp = (z - t) * (y / (z - a))
else if (z <= 1.25d-43) then
tmp = x + (y / (a / t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -3e-30) {
tmp = t_1;
} else if (z <= -4.5e-134) {
tmp = (z - t) * (y / (z - a));
} else if (z <= 1.25e-43) {
tmp = x + (y / (a / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (1.0 - (t / z))) tmp = 0 if z <= -3e-30: tmp = t_1 elif z <= -4.5e-134: tmp = (z - t) * (y / (z - a)) elif z <= 1.25e-43: tmp = x + (y / (a / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))) tmp = 0.0 if (z <= -3e-30) tmp = t_1; elseif (z <= -4.5e-134) tmp = Float64(Float64(z - t) * Float64(y / Float64(z - a))); elseif (z <= 1.25e-43) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (1.0 - (t / z))); tmp = 0.0; if (z <= -3e-30) tmp = t_1; elseif (z <= -4.5e-134) tmp = (z - t) * (y / (z - a)); elseif (z <= 1.25e-43) tmp = x + (y / (a / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e-30], t$95$1, If[LessEqual[z, -4.5e-134], N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e-43], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{if}\;z \leq -3 \cdot 10^{-30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-134}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-43}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.9999999999999999e-30 or 1.25000000000000005e-43 < z Initial program 76.4%
+-commutative76.4%
associate-*r/99.9%
fma-def99.9%
Simplified99.9%
fma-udef99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 84.4%
div-sub84.4%
*-inverses84.4%
Simplified84.4%
if -2.9999999999999999e-30 < z < -4.5000000000000005e-134Initial program 84.9%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in x around 0 70.1%
*-un-lft-identity70.1%
times-frac84.9%
clear-num84.8%
times-frac74.6%
*-un-lft-identity74.6%
associate-/l/84.6%
associate-/r/84.9%
/-rgt-identity84.9%
Applied egg-rr84.9%
if -4.5000000000000005e-134 < z < 1.25000000000000005e-43Initial program 95.0%
associate-*l/93.0%
Simplified93.0%
Taylor expanded in z around 0 80.4%
associate-/l*85.0%
Simplified85.0%
Final simplification84.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.2e-123) (not (<= z 1.45e-43))) (+ x (* (- z t) (/ y z))) (+ x (/ y (/ a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.2e-123) || !(z <= 1.45e-43)) {
tmp = x + ((z - t) * (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.2d-123)) .or. (.not. (z <= 1.45d-43))) then
tmp = x + ((z - t) * (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.2e-123) || !(z <= 1.45e-43)) {
tmp = x + ((z - t) * (y / z));
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.2e-123) or not (z <= 1.45e-43): tmp = x + ((z - t) * (y / z)) else: tmp = x + (y / (a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.2e-123) || !(z <= 1.45e-43)) tmp = Float64(x + Float64(Float64(z - t) * 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.2e-123) || ~((z <= 1.45e-43))) tmp = x + ((z - t) * (y / z)); else tmp = x + (y / (a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.2e-123], N[Not[LessEqual[z, 1.45e-43]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{-123} \lor \neg \left(z \leq 1.45 \cdot 10^{-43}\right):\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if z < -1.2e-123 or 1.4500000000000001e-43 < z Initial program 77.2%
associate-*l/95.1%
Simplified95.1%
Taylor expanded in z around inf 78.1%
if -1.2e-123 < z < 1.4500000000000001e-43Initial program 95.0%
associate-*l/93.0%
Simplified93.0%
Taylor expanded in z around 0 79.6%
associate-/l*84.2%
Simplified84.2%
Final simplification80.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.6e-125) (+ x (* (- z t) (/ y z))) (if (<= z 3.1e-30) (+ x (/ y (/ a t))) (+ x (/ y (/ (- z a) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.6e-125) {
tmp = x + ((z - t) * (y / z));
} else if (z <= 3.1e-30) {
tmp = x + (y / (a / t));
} else {
tmp = x + (y / ((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 (z <= (-1.6d-125)) then
tmp = x + ((z - t) * (y / z))
else if (z <= 3.1d-30) then
tmp = x + (y / (a / t))
else
tmp = x + (y / ((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 (z <= -1.6e-125) {
tmp = x + ((z - t) * (y / z));
} else if (z <= 3.1e-30) {
tmp = x + (y / (a / t));
} else {
tmp = x + (y / ((z - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.6e-125: tmp = x + ((z - t) * (y / z)) elif z <= 3.1e-30: tmp = x + (y / (a / t)) else: tmp = x + (y / ((z - a) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.6e-125) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / z))); elseif (z <= 3.1e-30) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.6e-125) tmp = x + ((z - t) * (y / z)); elseif (z <= 3.1e-30) tmp = x + (y / (a / t)); else tmp = x + (y / ((z - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.6e-125], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e-30], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-125}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-30}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\end{array}
\end{array}
if z < -1.5999999999999999e-125Initial program 78.1%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in z around inf 76.7%
if -1.5999999999999999e-125 < z < 3.09999999999999991e-30Initial program 95.2%
associate-*l/93.2%
Simplified93.2%
Taylor expanded in z around 0 78.4%
associate-/l*82.8%
Simplified82.8%
if 3.09999999999999991e-30 < z Initial program 75.3%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around 0 85.5%
Final simplification81.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -5.5e-47) (+ x (* y (- 1.0 (/ t z)))) (if (<= z 7.5e+16) (- x (/ (* y t) (- z a))) (+ x (/ y (/ (- z a) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.5e-47) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 7.5e+16) {
tmp = x - ((y * t) / (z - a));
} else {
tmp = x + (y / ((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 (z <= (-5.5d-47)) then
tmp = x + (y * (1.0d0 - (t / z)))
else if (z <= 7.5d+16) then
tmp = x - ((y * t) / (z - a))
else
tmp = x + (y / ((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 (z <= -5.5e-47) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 7.5e+16) {
tmp = x - ((y * t) / (z - a));
} else {
tmp = x + (y / ((z - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.5e-47: tmp = x + (y * (1.0 - (t / z))) elif z <= 7.5e+16: tmp = x - ((y * t) / (z - a)) else: tmp = x + (y / ((z - a) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.5e-47) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); elseif (z <= 7.5e+16) tmp = Float64(x - Float64(Float64(y * t) / Float64(z - a))); else tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.5e-47) tmp = x + (y * (1.0 - (t / z))); elseif (z <= 7.5e+16) tmp = x - ((y * t) / (z - a)); else tmp = x + (y / ((z - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.5e-47], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+16], N[(x - N[(N[(y * t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{-47}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+16}:\\
\;\;\;\;x - \frac{y \cdot t}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\end{array}
\end{array}
if z < -5.5000000000000002e-47Initial program 77.1%
+-commutative77.1%
associate-*r/99.9%
fma-def99.9%
Simplified99.9%
fma-udef99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 82.8%
div-sub82.8%
*-inverses82.8%
Simplified82.8%
if -5.5000000000000002e-47 < z < 7.5e16Initial program 94.4%
+-commutative94.4%
associate-*r/95.1%
fma-def95.2%
Simplified95.2%
Taylor expanded in t around inf 90.5%
neg-mul-190.5%
distribute-neg-frac90.5%
Simplified90.5%
Taylor expanded in y around 0 88.9%
+-commutative88.9%
mul-1-neg88.9%
associate-*r/90.4%
distribute-lft-neg-in90.4%
cancel-sign-sub-inv90.4%
associate-*r/88.9%
Simplified88.9%
if 7.5e16 < z Initial program 71.9%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around 0 89.5%
Final simplification87.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.35e+45) (+ x (* y (- 1.0 (/ t z)))) (if (<= z 9.8e+16) (+ x (/ y (/ (- a z) t))) (+ x (/ y (/ (- z a) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.35e+45) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 9.8e+16) {
tmp = x + (y / ((a - z) / t));
} else {
tmp = x + (y / ((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 (z <= (-1.35d+45)) then
tmp = x + (y * (1.0d0 - (t / z)))
else if (z <= 9.8d+16) then
tmp = x + (y / ((a - z) / t))
else
tmp = x + (y / ((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 (z <= -1.35e+45) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 9.8e+16) {
tmp = x + (y / ((a - z) / t));
} else {
tmp = x + (y / ((z - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.35e+45: tmp = x + (y * (1.0 - (t / z))) elif z <= 9.8e+16: tmp = x + (y / ((a - z) / t)) else: tmp = x + (y / ((z - a) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.35e+45) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); elseif (z <= 9.8e+16) tmp = Float64(x + Float64(y / Float64(Float64(a - z) / t))); else tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.35e+45) tmp = x + (y * (1.0 - (t / z))); elseif (z <= 9.8e+16) tmp = x + (y / ((a - z) / t)); else tmp = x + (y / ((z - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.35e+45], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.8e+16], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+45}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{+16}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\end{array}
\end{array}
if z < -1.34999999999999992e45Initial program 72.3%
+-commutative72.3%
associate-*r/99.9%
fma-def99.9%
Simplified99.9%
fma-udef99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 87.7%
div-sub87.7%
*-inverses87.7%
Simplified87.7%
if -1.34999999999999992e45 < z < 9.8e16Initial program 93.8%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in t around inf 89.1%
associate-*r/89.1%
neg-mul-189.1%
sub-neg89.1%
mul-1-neg89.1%
distribute-neg-in89.1%
mul-1-neg89.1%
remove-double-neg89.1%
Simplified89.1%
if 9.8e16 < z Initial program 71.9%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around 0 89.5%
Final simplification88.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.45e+38) (not (<= z 8.5e+16))) (+ x y) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.45e+38) || !(z <= 8.5e+16)) {
tmp = x + y;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.45d+38)) .or. (.not. (z <= 8.5d+16))) then
tmp = x + y
else
tmp = x + (y * (t / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.45e+38) || !(z <= 8.5e+16)) {
tmp = x + y;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.45e+38) or not (z <= 8.5e+16): tmp = x + y else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.45e+38) || !(z <= 8.5e+16)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.45e+38) || ~((z <= 8.5e+16))) tmp = x + y; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.45e+38], N[Not[LessEqual[z, 8.5e+16]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+38} \lor \neg \left(z \leq 8.5 \cdot 10^{+16}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -1.45000000000000003e38 or 8.5e16 < z Initial program 72.1%
associate-*l/93.3%
Simplified93.3%
Taylor expanded in z around inf 77.9%
if -1.45000000000000003e38 < z < 8.5e16Initial program 93.8%
+-commutative93.8%
associate-*r/95.8%
fma-def95.8%
Simplified95.8%
fma-udef95.8%
Applied egg-rr95.8%
Taylor expanded in z around 0 74.3%
Final simplification75.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -8.8e+42) (+ x y) (if (<= z 7.5e+16) (+ x (* t (/ y a))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.8e+42) {
tmp = x + y;
} else if (z <= 7.5e+16) {
tmp = x + (t * (y / a));
} 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 (z <= (-8.8d+42)) then
tmp = x + y
else if (z <= 7.5d+16) then
tmp = x + (t * (y / a))
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 (z <= -8.8e+42) {
tmp = x + y;
} else if (z <= 7.5e+16) {
tmp = x + (t * (y / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.8e+42: tmp = x + y elif z <= 7.5e+16: tmp = x + (t * (y / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.8e+42) tmp = Float64(x + y); elseif (z <= 7.5e+16) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.8e+42) tmp = x + y; elseif (z <= 7.5e+16) tmp = x + (t * (y / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.8e+42], N[(x + y), $MachinePrecision], If[LessEqual[z, 7.5e+16], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{+42}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+16}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -8.8000000000000005e42 or 7.5e16 < z Initial program 72.1%
associate-*l/93.3%
Simplified93.3%
Taylor expanded in z around inf 77.9%
if -8.8000000000000005e42 < z < 7.5e16Initial program 93.8%
associate-/l*96.3%
Simplified96.3%
associate-/l*93.8%
clear-num93.8%
associate-/r/93.8%
Applied egg-rr93.8%
Taylor expanded in z around 0 70.3%
associate-/l*74.8%
associate-/r/72.3%
Simplified72.3%
Final simplification74.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.8e+43) (+ x y) (if (<= z 5.6e+16) (+ x (/ y (/ a t))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.8e+43) {
tmp = x + y;
} else if (z <= 5.6e+16) {
tmp = x + (y / (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 (z <= (-2.8d+43)) then
tmp = x + y
else if (z <= 5.6d+16) then
tmp = x + (y / (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 (z <= -2.8e+43) {
tmp = x + y;
} else if (z <= 5.6e+16) {
tmp = x + (y / (a / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.8e+43: tmp = x + y elif z <= 5.6e+16: tmp = x + (y / (a / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.8e+43) tmp = Float64(x + y); elseif (z <= 5.6e+16) tmp = Float64(x + Float64(y / 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 (z <= -2.8e+43) tmp = x + y; elseif (z <= 5.6e+16) tmp = x + (y / (a / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.8e+43], N[(x + y), $MachinePrecision], If[LessEqual[z, 5.6e+16], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+43}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{+16}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -2.80000000000000019e43 or 5.6e16 < z Initial program 72.1%
associate-*l/93.3%
Simplified93.3%
Taylor expanded in z around inf 77.9%
if -2.80000000000000019e43 < z < 5.6e16Initial program 93.8%
associate-*l/95.1%
Simplified95.1%
Taylor expanded in z around 0 70.3%
associate-/l*74.8%
Simplified74.8%
Final simplification76.2%
(FPCore (x y z t a) :precision binary64 (+ x (* (- z t) (/ y (- z a)))))
double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (z - a)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((z - t) * (y / (z - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / (z - a)));
}
def code(x, y, z, t, a): return x + ((z - t) * (y / (z - a)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) * Float64(y / Float64(z - a)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) * (y / (z - a))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(z - t\right) \cdot \frac{y}{z - a}
\end{array}
Initial program 84.0%
associate-*l/94.3%
Simplified94.3%
Final simplification94.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.3e+216) (not (<= t 4e+199))) (* t (/ y a)) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.3e+216) || !(t <= 4e+199)) {
tmp = t * (y / a);
} 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 <= (-2.3d+216)) .or. (.not. (t <= 4d+199))) then
tmp = t * (y / a)
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 <= -2.3e+216) || !(t <= 4e+199)) {
tmp = t * (y / a);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.3e+216) or not (t <= 4e+199): tmp = t * (y / a) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.3e+216) || !(t <= 4e+199)) tmp = Float64(t * Float64(y / a)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.3e+216) || ~((t <= 4e+199))) tmp = t * (y / a); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.3e+216], N[Not[LessEqual[t, 4e+199]], $MachinePrecision]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{+216} \lor \neg \left(t \leq 4 \cdot 10^{+199}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -2.29999999999999996e216 or 4.00000000000000039e199 < t Initial program 82.8%
associate-*l/93.5%
Simplified93.5%
Taylor expanded in x around 0 60.9%
Taylor expanded in z around 0 58.8%
mul-1-neg58.8%
distribute-rgt-neg-out58.8%
Simplified58.8%
Taylor expanded in z around 0 47.5%
associate-*l/51.9%
*-commutative51.9%
Simplified51.9%
if -2.29999999999999996e216 < t < 4.00000000000000039e199Initial program 84.3%
associate-*l/94.5%
Simplified94.5%
Taylor expanded in z around inf 62.0%
Final simplification60.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.8e+215) (not (<= t 7.8e+199))) (* y (/ t a)) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.8e+215) || !(t <= 7.8e+199)) {
tmp = y * (t / a);
} 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 <= (-4.8d+215)) .or. (.not. (t <= 7.8d+199))) then
tmp = y * (t / a)
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 <= -4.8e+215) || !(t <= 7.8e+199)) {
tmp = y * (t / a);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.8e+215) or not (t <= 7.8e+199): tmp = y * (t / a) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.8e+215) || !(t <= 7.8e+199)) tmp = Float64(y * Float64(t / a)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4.8e+215) || ~((t <= 7.8e+199))) tmp = y * (t / a); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.8e+215], N[Not[LessEqual[t, 7.8e+199]], $MachinePrecision]], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{+215} \lor \neg \left(t \leq 7.8 \cdot 10^{+199}\right):\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -4.8000000000000002e215 or 7.8000000000000004e199 < t Initial program 82.8%
associate-*l/93.5%
Simplified93.5%
Taylor expanded in x around 0 60.9%
Taylor expanded in z around 0 58.8%
mul-1-neg58.8%
distribute-rgt-neg-out58.8%
Simplified58.8%
Taylor expanded in z around 0 47.5%
associate-*r/56.1%
Simplified56.1%
if -4.8000000000000002e215 < t < 7.8000000000000004e199Initial program 84.3%
associate-*l/94.5%
Simplified94.5%
Taylor expanded in z around inf 62.0%
Final simplification61.0%
(FPCore (x y z t a) :precision binary64 (+ x y))
double code(double x, double y, double z, double t, double a) {
return x + y;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return x + y;
}
def code(x, y, z, t, a): return x + y
function code(x, y, z, t, a) return Float64(x + y) end
function tmp = code(x, y, z, t, a) tmp = x + y; end
code[x_, y_, z_, t_, a_] := N[(x + y), $MachinePrecision]
\begin{array}{l}
\\
x + y
\end{array}
Initial program 84.0%
associate-*l/94.3%
Simplified94.3%
Taylor expanded in z around inf 56.0%
Final simplification56.0%
(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.0%
associate-*l/94.3%
Simplified94.3%
Taylor expanded in x around inf 47.1%
Final simplification47.1%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
herbie shell --seed 2023192
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))