
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (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 - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (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 - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= t -9.5e+161) (not (<= t 1.1e+176))) (+ y (/ (- a z) (/ t (- y x)))) (fma (- y x) (/ (- z t) (- a t)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -9.5e+161) || !(t <= 1.1e+176)) {
tmp = y + ((a - z) / (t / (y - x)));
} else {
tmp = fma((y - x), ((z - t) / (a - t)), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -9.5e+161) || !(t <= 1.1e+176)) tmp = Float64(y + Float64(Float64(a - z) / Float64(t / Float64(y - x)))); else tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -9.5e+161], N[Not[LessEqual[t, 1.1e+176]], $MachinePrecision]], N[(y + N[(N[(a - z), $MachinePrecision] / N[(t / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+161} \lor \neg \left(t \leq 1.1 \cdot 10^{+176}\right):\\
\;\;\;\;y + \frac{a - z}{\frac{t}{y - x}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\
\end{array}
\end{array}
if t < -9.50000000000000061e161 or 1.10000000000000004e176 < t Initial program 24.1%
Taylor expanded in t around inf 75.2%
associate--l+75.2%
distribute-lft-out--75.2%
div-sub75.2%
mul-1-neg75.2%
unsub-neg75.2%
div-sub75.2%
associate-/l*83.6%
associate-/l*93.7%
distribute-rgt-out--93.7%
Simplified93.7%
*-commutative93.7%
clear-num93.7%
un-div-inv93.8%
Applied egg-rr93.8%
if -9.50000000000000061e161 < t < 1.10000000000000004e176Initial program 77.4%
+-commutative77.4%
associate-/l*94.0%
fma-define94.1%
Simplified94.1%
Final simplification94.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (/ (- a z) (/ t (- y x))))))
(if (<= t -6.2e+95)
t_1
(if (<= t 0.032)
(+ x (/ (* (- y x) (- z t)) (- a t)))
(if (<= t 1.6e+178) (+ x (* y (/ (- z t) (- a t)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y + ((a - z) / (t / (y - x)));
double tmp;
if (t <= -6.2e+95) {
tmp = t_1;
} else if (t <= 0.032) {
tmp = x + (((y - x) * (z - t)) / (a - t));
} else if (t <= 1.6e+178) {
tmp = x + (y * ((z - t) / (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 = y + ((a - z) / (t / (y - x)))
if (t <= (-6.2d+95)) then
tmp = t_1
else if (t <= 0.032d0) then
tmp = x + (((y - x) * (z - t)) / (a - t))
else if (t <= 1.6d+178) then
tmp = x + (y * ((z - t) / (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 = y + ((a - z) / (t / (y - x)));
double tmp;
if (t <= -6.2e+95) {
tmp = t_1;
} else if (t <= 0.032) {
tmp = x + (((y - x) * (z - t)) / (a - t));
} else if (t <= 1.6e+178) {
tmp = x + (y * ((z - t) / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y + ((a - z) / (t / (y - x))) tmp = 0 if t <= -6.2e+95: tmp = t_1 elif t <= 0.032: tmp = x + (((y - x) * (z - t)) / (a - t)) elif t <= 1.6e+178: tmp = x + (y * ((z - t) / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y + Float64(Float64(a - z) / Float64(t / Float64(y - x)))) tmp = 0.0 if (t <= -6.2e+95) tmp = t_1; elseif (t <= 0.032) tmp = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))); elseif (t <= 1.6e+178) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y + ((a - z) / (t / (y - x))); tmp = 0.0; if (t <= -6.2e+95) tmp = t_1; elseif (t <= 0.032) tmp = x + (((y - x) * (z - t)) / (a - t)); elseif (t <= 1.6e+178) tmp = x + (y * ((z - t) / (a - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(N[(a - z), $MachinePrecision] / N[(t / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e+95], t$95$1, If[LessEqual[t, 0.032], N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.6e+178], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \frac{a - z}{\frac{t}{y - x}}\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 0.032:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+178}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.2000000000000006e95 or 1.6e178 < t Initial program 24.1%
Taylor expanded in t around inf 74.6%
associate--l+74.6%
distribute-lft-out--74.6%
div-sub74.6%
mul-1-neg74.6%
unsub-neg74.6%
div-sub74.6%
associate-/l*81.7%
associate-/l*90.3%
distribute-rgt-out--90.3%
Simplified90.3%
*-commutative90.3%
clear-num90.3%
un-div-inv90.4%
Applied egg-rr90.4%
if -6.2000000000000006e95 < t < 0.032000000000000001Initial program 84.8%
if 0.032000000000000001 < t < 1.6e178Initial program 56.6%
Taylor expanded in y around inf 55.8%
associate-/l*86.2%
Simplified86.2%
Final simplification86.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -7.2e+51)
(+ y (* (- z a) (/ (- x y) t)))
(if (<= t 1.25e-108)
(+ x (/ (- y x) (/ (- a t) z)))
(if (<= t 9.5e+179)
(+ x (* y (/ (- z t) (- a t))))
(+ y (/ (- a z) (/ t (- y x))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7.2e+51) {
tmp = y + ((z - a) * ((x - y) / t));
} else if (t <= 1.25e-108) {
tmp = x + ((y - x) / ((a - t) / z));
} else if (t <= 9.5e+179) {
tmp = x + (y * ((z - t) / (a - t)));
} else {
tmp = y + ((a - z) / (t / (y - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-7.2d+51)) then
tmp = y + ((z - a) * ((x - y) / t))
else if (t <= 1.25d-108) then
tmp = x + ((y - x) / ((a - t) / z))
else if (t <= 9.5d+179) then
tmp = x + (y * ((z - t) / (a - t)))
else
tmp = y + ((a - z) / (t / (y - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7.2e+51) {
tmp = y + ((z - a) * ((x - y) / t));
} else if (t <= 1.25e-108) {
tmp = x + ((y - x) / ((a - t) / z));
} else if (t <= 9.5e+179) {
tmp = x + (y * ((z - t) / (a - t)));
} else {
tmp = y + ((a - z) / (t / (y - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -7.2e+51: tmp = y + ((z - a) * ((x - y) / t)) elif t <= 1.25e-108: tmp = x + ((y - x) / ((a - t) / z)) elif t <= 9.5e+179: tmp = x + (y * ((z - t) / (a - t))) else: tmp = y + ((a - z) / (t / (y - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -7.2e+51) tmp = Float64(y + Float64(Float64(z - a) * Float64(Float64(x - y) / t))); elseif (t <= 1.25e-108) tmp = Float64(x + Float64(Float64(y - x) / Float64(Float64(a - t) / z))); elseif (t <= 9.5e+179) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))); else tmp = Float64(y + Float64(Float64(a - z) / Float64(t / Float64(y - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -7.2e+51) tmp = y + ((z - a) * ((x - y) / t)); elseif (t <= 1.25e-108) tmp = x + ((y - x) / ((a - t) / z)); elseif (t <= 9.5e+179) tmp = x + (y * ((z - t) / (a - t))); else tmp = y + ((a - z) / (t / (y - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7.2e+51], N[(y + N[(N[(z - a), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e-108], N[(x + N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e+179], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(a - z), $MachinePrecision] / N[(t / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{+51}:\\
\;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-108}:\\
\;\;\;\;x + \frac{y - x}{\frac{a - t}{z}}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+179}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y + \frac{a - z}{\frac{t}{y - x}}\\
\end{array}
\end{array}
if t < -7.20000000000000022e51Initial program 30.9%
Taylor expanded in t around inf 69.2%
associate--l+69.2%
distribute-lft-out--69.2%
div-sub69.2%
mul-1-neg69.2%
unsub-neg69.2%
div-sub69.2%
associate-/l*73.2%
associate-/l*77.5%
distribute-rgt-out--77.5%
Simplified77.5%
if -7.20000000000000022e51 < t < 1.25e-108Initial program 85.1%
clear-num85.0%
associate-/r/85.0%
Applied egg-rr85.0%
*-commutative85.0%
associate-*l*96.7%
div-inv96.7%
clear-num96.7%
un-div-inv96.7%
Applied egg-rr96.7%
Taylor expanded in z around inf 86.8%
if 1.25e-108 < t < 9.5e179Initial program 72.2%
Taylor expanded in y around inf 64.1%
associate-/l*81.9%
Simplified81.9%
if 9.5e179 < t Initial program 24.0%
Taylor expanded in t around inf 76.5%
associate--l+76.5%
distribute-lft-out--76.5%
div-sub76.5%
mul-1-neg76.5%
unsub-neg76.5%
div-sub76.5%
associate-/l*86.5%
associate-/l*99.9%
distribute-rgt-out--99.9%
Simplified99.9%
*-commutative99.9%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Final simplification85.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (* (- z a) (/ (- x y) t)))))
(if (<= t -2.45e+51)
t_1
(if (<= t 1.1e-107)
(+ x (/ (- y x) (/ (- a t) z)))
(if (<= t 2.2e+178) (+ x (* y (/ (- z t) (- a t)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y + ((z - a) * ((x - y) / t));
double tmp;
if (t <= -2.45e+51) {
tmp = t_1;
} else if (t <= 1.1e-107) {
tmp = x + ((y - x) / ((a - t) / z));
} else if (t <= 2.2e+178) {
tmp = x + (y * ((z - t) / (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 = y + ((z - a) * ((x - y) / t))
if (t <= (-2.45d+51)) then
tmp = t_1
else if (t <= 1.1d-107) then
tmp = x + ((y - x) / ((a - t) / z))
else if (t <= 2.2d+178) then
tmp = x + (y * ((z - t) / (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 = y + ((z - a) * ((x - y) / t));
double tmp;
if (t <= -2.45e+51) {
tmp = t_1;
} else if (t <= 1.1e-107) {
tmp = x + ((y - x) / ((a - t) / z));
} else if (t <= 2.2e+178) {
tmp = x + (y * ((z - t) / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y + ((z - a) * ((x - y) / t)) tmp = 0 if t <= -2.45e+51: tmp = t_1 elif t <= 1.1e-107: tmp = x + ((y - x) / ((a - t) / z)) elif t <= 2.2e+178: tmp = x + (y * ((z - t) / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y + Float64(Float64(z - a) * Float64(Float64(x - y) / t))) tmp = 0.0 if (t <= -2.45e+51) tmp = t_1; elseif (t <= 1.1e-107) tmp = Float64(x + Float64(Float64(y - x) / Float64(Float64(a - t) / z))); elseif (t <= 2.2e+178) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y + ((z - a) * ((x - y) / t)); tmp = 0.0; if (t <= -2.45e+51) tmp = t_1; elseif (t <= 1.1e-107) tmp = x + ((y - x) / ((a - t) / z)); elseif (t <= 2.2e+178) tmp = x + (y * ((z - t) / (a - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(N[(z - a), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.45e+51], t$95$1, If[LessEqual[t, 1.1e-107], N[(x + N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e+178], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(z - a\right) \cdot \frac{x - y}{t}\\
\mathbf{if}\;t \leq -2.45 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-107}:\\
\;\;\;\;x + \frac{y - x}{\frac{a - t}{z}}\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+178}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.44999999999999992e51 or 2.19999999999999997e178 < t Initial program 28.3%
Taylor expanded in t around inf 72.0%
associate--l+72.0%
distribute-lft-out--72.0%
div-sub72.0%
mul-1-neg72.0%
unsub-neg72.0%
div-sub72.0%
associate-/l*78.3%
associate-/l*86.1%
distribute-rgt-out--86.1%
Simplified86.1%
if -2.44999999999999992e51 < t < 1.10000000000000006e-107Initial program 85.1%
clear-num85.0%
associate-/r/85.0%
Applied egg-rr85.0%
*-commutative85.0%
associate-*l*96.7%
div-inv96.7%
clear-num96.7%
un-div-inv96.7%
Applied egg-rr96.7%
Taylor expanded in z around inf 86.8%
if 1.10000000000000006e-107 < t < 2.19999999999999997e178Initial program 72.2%
Taylor expanded in y around inf 64.1%
associate-/l*81.9%
Simplified81.9%
Final simplification85.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (* (/ x t) (- a z)))))
(if (<= t -6.8e+51)
t_1
(if (<= t 1.15e-107)
(+ x (/ (- y x) (/ (- a t) z)))
(if (<= t 2.05e+186) (+ x (* y (/ (- z t) (- a t)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y - ((x / t) * (a - z));
double tmp;
if (t <= -6.8e+51) {
tmp = t_1;
} else if (t <= 1.15e-107) {
tmp = x + ((y - x) / ((a - t) / z));
} else if (t <= 2.05e+186) {
tmp = x + (y * ((z - t) / (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 = y - ((x / t) * (a - z))
if (t <= (-6.8d+51)) then
tmp = t_1
else if (t <= 1.15d-107) then
tmp = x + ((y - x) / ((a - t) / z))
else if (t <= 2.05d+186) then
tmp = x + (y * ((z - t) / (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 = y - ((x / t) * (a - z));
double tmp;
if (t <= -6.8e+51) {
tmp = t_1;
} else if (t <= 1.15e-107) {
tmp = x + ((y - x) / ((a - t) / z));
} else if (t <= 2.05e+186) {
tmp = x + (y * ((z - t) / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y - ((x / t) * (a - z)) tmp = 0 if t <= -6.8e+51: tmp = t_1 elif t <= 1.15e-107: tmp = x + ((y - x) / ((a - t) / z)) elif t <= 2.05e+186: tmp = x + (y * ((z - t) / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y - Float64(Float64(x / t) * Float64(a - z))) tmp = 0.0 if (t <= -6.8e+51) tmp = t_1; elseif (t <= 1.15e-107) tmp = Float64(x + Float64(Float64(y - x) / Float64(Float64(a - t) / z))); elseif (t <= 2.05e+186) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y - ((x / t) * (a - z)); tmp = 0.0; if (t <= -6.8e+51) tmp = t_1; elseif (t <= 1.15e-107) tmp = x + ((y - x) / ((a - t) / z)); elseif (t <= 2.05e+186) tmp = x + (y * ((z - t) / (a - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(N[(x / t), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.8e+51], t$95$1, If[LessEqual[t, 1.15e-107], N[(x + N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.05e+186], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{x}{t} \cdot \left(a - z\right)\\
\mathbf{if}\;t \leq -6.8 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-107}:\\
\;\;\;\;x + \frac{y - x}{\frac{a - t}{z}}\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{+186}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.79999999999999969e51 or 2.05e186 < t Initial program 26.4%
Taylor expanded in t around inf 71.2%
associate--l+71.2%
distribute-lft-out--71.2%
div-sub71.2%
mul-1-neg71.2%
unsub-neg71.2%
div-sub71.2%
associate-/l*77.7%
associate-/l*85.7%
distribute-rgt-out--85.7%
Simplified85.7%
Taylor expanded in y around 0 82.9%
neg-mul-182.9%
distribute-neg-frac82.9%
Simplified82.9%
if -6.79999999999999969e51 < t < 1.15000000000000002e-107Initial program 85.1%
clear-num85.0%
associate-/r/85.0%
Applied egg-rr85.0%
*-commutative85.0%
associate-*l*96.7%
div-inv96.7%
clear-num96.7%
un-div-inv96.7%
Applied egg-rr96.7%
Taylor expanded in z around inf 86.8%
if 1.15000000000000002e-107 < t < 2.05e186Initial program 73.1%
Taylor expanded in y around inf 65.3%
associate-/l*82.4%
Simplified82.4%
Final simplification84.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -9e+66)
y
(if (<= t -1.7e-104)
(+ y x)
(if (<= t 9.2e-129) x (if (<= t 7.5e+181) (+ y x) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9e+66) {
tmp = y;
} else if (t <= -1.7e-104) {
tmp = y + x;
} else if (t <= 9.2e-129) {
tmp = x;
} else if (t <= 7.5e+181) {
tmp = y + x;
} else {
tmp = 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 <= (-9d+66)) then
tmp = y
else if (t <= (-1.7d-104)) then
tmp = y + x
else if (t <= 9.2d-129) then
tmp = x
else if (t <= 7.5d+181) then
tmp = y + x
else
tmp = 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 <= -9e+66) {
tmp = y;
} else if (t <= -1.7e-104) {
tmp = y + x;
} else if (t <= 9.2e-129) {
tmp = x;
} else if (t <= 7.5e+181) {
tmp = y + x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -9e+66: tmp = y elif t <= -1.7e-104: tmp = y + x elif t <= 9.2e-129: tmp = x elif t <= 7.5e+181: tmp = y + x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9e+66) tmp = y; elseif (t <= -1.7e-104) tmp = Float64(y + x); elseif (t <= 9.2e-129) tmp = x; elseif (t <= 7.5e+181) tmp = Float64(y + x); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -9e+66) tmp = y; elseif (t <= -1.7e-104) tmp = y + x; elseif (t <= 9.2e-129) tmp = x; elseif (t <= 7.5e+181) tmp = y + x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9e+66], y, If[LessEqual[t, -1.7e-104], N[(y + x), $MachinePrecision], If[LessEqual[t, 9.2e-129], x, If[LessEqual[t, 7.5e+181], N[(y + x), $MachinePrecision], y]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{+66}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -1.7 \cdot 10^{-104}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 9.2 \cdot 10^{-129}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{+181}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -8.9999999999999997e66 or 7.5000000000000005e181 < t Initial program 24.6%
Taylor expanded in t around inf 66.0%
if -8.9999999999999997e66 < t < -1.70000000000000008e-104 or 9.1999999999999998e-129 < t < 7.5000000000000005e181Initial program 76.9%
Taylor expanded in y around inf 66.4%
*-commutative66.4%
Simplified66.4%
Taylor expanded in t around inf 40.6%
if -1.70000000000000008e-104 < t < 9.1999999999999998e-129Initial program 86.5%
Taylor expanded in a around inf 34.7%
Final simplification45.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.56e+159) (not (<= t 1.8e+185))) (+ y (/ (- a z) (/ t (- y x)))) (+ x (/ (- y x) (/ (- t a) (- t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.56e+159) || !(t <= 1.8e+185)) {
tmp = y + ((a - z) / (t / (y - x)));
} else {
tmp = x + ((y - x) / ((t - 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 <= (-1.56d+159)) .or. (.not. (t <= 1.8d+185))) then
tmp = y + ((a - z) / (t / (y - x)))
else
tmp = x + ((y - x) / ((t - 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 <= -1.56e+159) || !(t <= 1.8e+185)) {
tmp = y + ((a - z) / (t / (y - x)));
} else {
tmp = x + ((y - x) / ((t - a) / (t - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.56e+159) or not (t <= 1.8e+185): tmp = y + ((a - z) / (t / (y - x))) else: tmp = x + ((y - x) / ((t - a) / (t - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.56e+159) || !(t <= 1.8e+185)) tmp = Float64(y + Float64(Float64(a - z) / Float64(t / Float64(y - x)))); else tmp = Float64(x + Float64(Float64(y - x) / Float64(Float64(t - a) / Float64(t - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.56e+159) || ~((t <= 1.8e+185))) tmp = y + ((a - z) / (t / (y - x))); else tmp = x + ((y - x) / ((t - a) / (t - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.56e+159], N[Not[LessEqual[t, 1.8e+185]], $MachinePrecision]], N[(y + N[(N[(a - z), $MachinePrecision] / N[(t / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] / N[(N[(t - a), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.56 \cdot 10^{+159} \lor \neg \left(t \leq 1.8 \cdot 10^{+185}\right):\\
\;\;\;\;y + \frac{a - z}{\frac{t}{y - x}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{t - a}{t - z}}\\
\end{array}
\end{array}
if t < -1.56e159 or 1.80000000000000014e185 < t Initial program 22.7%
Taylor expanded in t around inf 74.8%
associate--l+74.8%
distribute-lft-out--74.8%
div-sub74.8%
mul-1-neg74.8%
unsub-neg74.8%
div-sub74.8%
associate-/l*83.3%
associate-/l*93.6%
distribute-rgt-out--93.6%
Simplified93.6%
*-commutative93.6%
clear-num93.6%
un-div-inv93.7%
Applied egg-rr93.7%
if -1.56e159 < t < 1.80000000000000014e185Initial program 77.6%
clear-num77.5%
associate-/r/77.5%
Applied egg-rr77.5%
*-commutative77.5%
associate-*l*94.0%
div-inv94.1%
clear-num94.0%
un-div-inv94.1%
Applied egg-rr94.1%
Final simplification94.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.7e-67) (not (<= a 6.2e-126))) (+ x (* y (/ (- z t) (- a t)))) (- y (/ (* z (- y x)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.7e-67) || !(a <= 6.2e-126)) {
tmp = x + (y * ((z - t) / (a - t)));
} else {
tmp = y - ((z * (y - x)) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-5.7d-67)) .or. (.not. (a <= 6.2d-126))) then
tmp = x + (y * ((z - t) / (a - t)))
else
tmp = y - ((z * (y - x)) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.7e-67) || !(a <= 6.2e-126)) {
tmp = x + (y * ((z - t) / (a - t)));
} else {
tmp = y - ((z * (y - x)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.7e-67) or not (a <= 6.2e-126): tmp = x + (y * ((z - t) / (a - t))) else: tmp = y - ((z * (y - x)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.7e-67) || !(a <= 6.2e-126)) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))); else tmp = Float64(y - Float64(Float64(z * Float64(y - x)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.7e-67) || ~((a <= 6.2e-126))) tmp = x + (y * ((z - t) / (a - t))); else tmp = y - ((z * (y - x)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.7e-67], N[Not[LessEqual[a, 6.2e-126]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y - N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.7 \cdot 10^{-67} \lor \neg \left(a \leq 6.2 \cdot 10^{-126}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y - \frac{z \cdot \left(y - x\right)}{t}\\
\end{array}
\end{array}
if a < -5.7000000000000002e-67 or 6.2000000000000003e-126 < a Initial program 72.0%
Taylor expanded in y around inf 65.8%
associate-/l*82.3%
Simplified82.3%
if -5.7000000000000002e-67 < a < 6.2000000000000003e-126Initial program 53.1%
Taylor expanded in t around inf 85.0%
associate--l+85.0%
distribute-lft-out--85.0%
div-sub85.0%
mul-1-neg85.0%
unsub-neg85.0%
div-sub85.0%
associate-/l*83.7%
associate-/l*76.7%
distribute-rgt-out--83.6%
Simplified83.6%
Taylor expanded in z around inf 79.9%
Final simplification81.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.8e+67) (not (<= t 8e-125))) (/ y (/ (- t a) (- t z))) (+ x (/ (- y x) (/ a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.8e+67) || !(t <= 8e-125)) {
tmp = y / ((t - a) / (t - z));
} else {
tmp = x + ((y - x) / (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 ((t <= (-4.8d+67)) .or. (.not. (t <= 8d-125))) then
tmp = y / ((t - a) / (t - z))
else
tmp = x + ((y - x) / (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 ((t <= -4.8e+67) || !(t <= 8e-125)) {
tmp = y / ((t - a) / (t - z));
} else {
tmp = x + ((y - x) / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.8e+67) or not (t <= 8e-125): tmp = y / ((t - a) / (t - z)) else: tmp = x + ((y - x) / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.8e+67) || !(t <= 8e-125)) tmp = Float64(y / Float64(Float64(t - a) / Float64(t - z))); else tmp = Float64(x + Float64(Float64(y - x) / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4.8e+67) || ~((t <= 8e-125))) tmp = y / ((t - a) / (t - z)); else tmp = x + ((y - x) / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.8e+67], N[Not[LessEqual[t, 8e-125]], $MachinePrecision]], N[(y / N[(N[(t - a), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{+67} \lor \neg \left(t \leq 8 \cdot 10^{-125}\right):\\
\;\;\;\;\frac{y}{\frac{t - a}{t - z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\
\end{array}
\end{array}
if t < -4.80000000000000004e67 or 8.0000000000000001e-125 < t Initial program 46.0%
clear-num45.9%
associate-/r/45.9%
Applied egg-rr45.9%
*-commutative45.9%
associate-*l*76.7%
div-inv76.9%
clear-num76.8%
un-div-inv76.9%
Applied egg-rr76.9%
Taylor expanded in x around 0 45.5%
associate-/l*71.8%
Simplified71.8%
clear-num71.8%
un-div-inv71.8%
Applied egg-rr71.8%
if -4.80000000000000004e67 < t < 8.0000000000000001e-125Initial program 86.0%
clear-num85.9%
associate-/r/85.9%
Applied egg-rr85.9%
*-commutative85.9%
associate-*l*97.5%
div-inv97.5%
clear-num97.5%
un-div-inv97.5%
Applied egg-rr97.5%
Taylor expanded in t around 0 75.9%
Final simplification73.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.5e+77) (not (<= t 1.05e-124))) (* y (/ (- z t) (- a t))) (+ x (/ (- y x) (/ a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.5e+77) || !(t <= 1.05e-124)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + ((y - x) / (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 ((t <= (-4.5d+77)) .or. (.not. (t <= 1.05d-124))) then
tmp = y * ((z - t) / (a - t))
else
tmp = x + ((y - x) / (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 ((t <= -4.5e+77) || !(t <= 1.05e-124)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + ((y - x) / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.5e+77) or not (t <= 1.05e-124): tmp = y * ((z - t) / (a - t)) else: tmp = x + ((y - x) / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.5e+77) || !(t <= 1.05e-124)) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x + Float64(Float64(y - x) / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4.5e+77) || ~((t <= 1.05e-124))) tmp = y * ((z - t) / (a - t)); else tmp = x + ((y - x) / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.5e+77], N[Not[LessEqual[t, 1.05e-124]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+77} \lor \neg \left(t \leq 1.05 \cdot 10^{-124}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\
\end{array}
\end{array}
if t < -4.50000000000000024e77 or 1.05e-124 < t Initial program 46.0%
clear-num45.9%
associate-/r/45.9%
Applied egg-rr45.9%
*-commutative45.9%
associate-*l*76.7%
div-inv76.9%
clear-num76.8%
un-div-inv76.9%
Applied egg-rr76.9%
Taylor expanded in x around 0 45.5%
associate-/l*71.8%
Simplified71.8%
if -4.50000000000000024e77 < t < 1.05e-124Initial program 86.0%
clear-num85.9%
associate-/r/85.9%
Applied egg-rr85.9%
*-commutative85.9%
associate-*l*97.5%
div-inv97.5%
clear-num97.5%
un-div-inv97.5%
Applied egg-rr97.5%
Taylor expanded in t around 0 75.9%
Final simplification73.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -5.4e-99) (not (<= t 1e-124))) (* y (/ (- z t) (- a t))) (+ x (* z (/ (- y x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5.4e-99) || !(t <= 1e-124)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (z * ((y - x) / 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 <= (-5.4d-99)) .or. (.not. (t <= 1d-124))) then
tmp = y * ((z - t) / (a - t))
else
tmp = x + (z * ((y - x) / 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 <= -5.4e-99) || !(t <= 1e-124)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (z * ((y - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -5.4e-99) or not (t <= 1e-124): tmp = y * ((z - t) / (a - t)) else: tmp = x + (z * ((y - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -5.4e-99) || !(t <= 1e-124)) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -5.4e-99) || ~((t <= 1e-124))) tmp = y * ((z - t) / (a - t)); else tmp = x + (z * ((y - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -5.4e-99], N[Not[LessEqual[t, 1e-124]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.4 \cdot 10^{-99} \lor \neg \left(t \leq 10^{-124}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\
\end{array}
\end{array}
if t < -5.4e-99 or 9.99999999999999933e-125 < t Initial program 54.6%
clear-num54.5%
associate-/r/54.5%
Applied egg-rr54.5%
*-commutative54.5%
associate-*l*81.0%
div-inv81.1%
clear-num81.1%
un-div-inv81.1%
Applied egg-rr81.1%
Taylor expanded in x around 0 45.9%
associate-/l*66.7%
Simplified66.7%
if -5.4e-99 < t < 9.99999999999999933e-125Initial program 87.3%
Taylor expanded in t around 0 78.0%
associate-/l*84.7%
Simplified84.7%
Final simplification72.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.8e+54) (not (<= a 3.25e+42))) (+ x (* y (/ (- z t) a))) (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.8e+54) || !(a <= 3.25e+42)) {
tmp = x + (y * ((z - t) / a));
} 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 ((a <= (-1.8d+54)) .or. (.not. (a <= 3.25d+42))) then
tmp = x + (y * ((z - t) / a))
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 ((a <= -1.8e+54) || !(a <= 3.25e+42)) {
tmp = x + (y * ((z - t) / a));
} else {
tmp = y * ((z - t) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.8e+54) or not (a <= 3.25e+42): tmp = x + (y * ((z - t) / a)) else: tmp = y * ((z - t) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.8e+54) || !(a <= 3.25e+42)) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a))); 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 ((a <= -1.8e+54) || ~((a <= 3.25e+42))) tmp = x + (y * ((z - t) / a)); else tmp = y * ((z - t) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.8e+54], N[Not[LessEqual[a, 3.25e+42]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{+54} \lor \neg \left(a \leq 3.25 \cdot 10^{+42}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\end{array}
\end{array}
if a < -1.8000000000000001e54 or 3.25000000000000026e42 < a Initial program 70.1%
Taylor expanded in y around inf 70.2%
*-commutative70.2%
Simplified70.2%
Taylor expanded in a around inf 66.5%
associate-/l*78.6%
Simplified78.6%
if -1.8000000000000001e54 < a < 3.25000000000000026e42Initial program 62.2%
clear-num62.2%
associate-/r/62.2%
Applied egg-rr62.2%
*-commutative62.2%
associate-*l*79.4%
div-inv79.6%
clear-num79.5%
un-div-inv79.5%
Applied egg-rr79.5%
Taylor expanded in x around 0 48.7%
associate-/l*64.6%
Simplified64.6%
Final simplification70.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.02e+141) (not (<= a 1.65e+38))) (+ x (* y (/ z a))) (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.02e+141) || !(a <= 1.65e+38)) {
tmp = x + (y * (z / a));
} 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 ((a <= (-1.02d+141)) .or. (.not. (a <= 1.65d+38))) then
tmp = x + (y * (z / a))
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 ((a <= -1.02e+141) || !(a <= 1.65e+38)) {
tmp = x + (y * (z / a));
} else {
tmp = y * ((z - t) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.02e+141) or not (a <= 1.65e+38): tmp = x + (y * (z / a)) else: tmp = y * ((z - t) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.02e+141) || !(a <= 1.65e+38)) tmp = Float64(x + Float64(y * Float64(z / a))); 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 ((a <= -1.02e+141) || ~((a <= 1.65e+38))) tmp = x + (y * (z / a)); else tmp = y * ((z - t) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.02e+141], N[Not[LessEqual[a, 1.65e+38]], $MachinePrecision]], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.02 \cdot 10^{+141} \lor \neg \left(a \leq 1.65 \cdot 10^{+38}\right):\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\end{array}
\end{array}
if a < -1.02e141 or 1.65e38 < a Initial program 69.5%
Taylor expanded in t around 0 60.1%
Taylor expanded in y around inf 62.7%
associate-/l*74.2%
Simplified74.2%
if -1.02e141 < a < 1.65e38Initial program 63.0%
clear-num63.0%
associate-/r/63.0%
Applied egg-rr63.0%
*-commutative63.0%
associate-*l*80.8%
div-inv80.9%
clear-num80.9%
un-div-inv80.9%
Applied egg-rr80.9%
Taylor expanded in x around 0 48.0%
associate-/l*64.0%
Simplified64.0%
Final simplification67.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.9e+51) (- y (* (/ x t) (- a z))) (if (<= t 1.05e-124) (+ x (/ (- y x) (/ a z))) (/ y (/ (- t a) (- t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.9e+51) {
tmp = y - ((x / t) * (a - z));
} else if (t <= 1.05e-124) {
tmp = x + ((y - x) / (a / z));
} else {
tmp = y / ((t - 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 <= (-1.9d+51)) then
tmp = y - ((x / t) * (a - z))
else if (t <= 1.05d-124) then
tmp = x + ((y - x) / (a / z))
else
tmp = y / ((t - 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 <= -1.9e+51) {
tmp = y - ((x / t) * (a - z));
} else if (t <= 1.05e-124) {
tmp = x + ((y - x) / (a / z));
} else {
tmp = y / ((t - a) / (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.9e+51: tmp = y - ((x / t) * (a - z)) elif t <= 1.05e-124: tmp = x + ((y - x) / (a / z)) else: tmp = y / ((t - a) / (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.9e+51) tmp = Float64(y - Float64(Float64(x / t) * Float64(a - z))); elseif (t <= 1.05e-124) tmp = Float64(x + Float64(Float64(y - x) / Float64(a / z))); else tmp = Float64(y / Float64(Float64(t - a) / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.9e+51) tmp = y - ((x / t) * (a - z)); elseif (t <= 1.05e-124) tmp = x + ((y - x) / (a / z)); else tmp = y / ((t - a) / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.9e+51], N[(y - N[(N[(x / t), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e-124], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(N[(t - a), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{+51}:\\
\;\;\;\;y - \frac{x}{t} \cdot \left(a - z\right)\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-124}:\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{t - a}{t - z}}\\
\end{array}
\end{array}
if t < -1.8999999999999999e51Initial program 30.9%
Taylor expanded in t around inf 69.2%
associate--l+69.2%
distribute-lft-out--69.2%
div-sub69.2%
mul-1-neg69.2%
unsub-neg69.2%
div-sub69.2%
associate-/l*73.2%
associate-/l*77.5%
distribute-rgt-out--77.5%
Simplified77.5%
Taylor expanded in y around 0 75.7%
neg-mul-175.7%
distribute-neg-frac75.7%
Simplified75.7%
if -1.8999999999999999e51 < t < 1.05e-124Initial program 86.2%
clear-num86.1%
associate-/r/86.1%
Applied egg-rr86.1%
*-commutative86.1%
associate-*l*98.2%
div-inv98.2%
clear-num98.2%
un-div-inv98.2%
Applied egg-rr98.2%
Taylor expanded in t around 0 78.0%
if 1.05e-124 < t Initial program 55.8%
clear-num55.7%
associate-/r/55.7%
Applied egg-rr55.7%
*-commutative55.7%
associate-*l*81.7%
div-inv81.8%
clear-num81.8%
un-div-inv81.8%
Applied egg-rr81.8%
Taylor expanded in x around 0 46.8%
associate-/l*68.6%
Simplified68.6%
clear-num68.6%
un-div-inv68.6%
Applied egg-rr68.6%
Final simplification74.3%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.9e+51) (- y (* x (/ (- a z) t))) (if (<= t 8e-125) (+ x (/ (- y x) (/ a z))) (/ y (/ (- t a) (- t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.9e+51) {
tmp = y - (x * ((a - z) / t));
} else if (t <= 8e-125) {
tmp = x + ((y - x) / (a / z));
} else {
tmp = y / ((t - 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 <= (-1.9d+51)) then
tmp = y - (x * ((a - z) / t))
else if (t <= 8d-125) then
tmp = x + ((y - x) / (a / z))
else
tmp = y / ((t - 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 <= -1.9e+51) {
tmp = y - (x * ((a - z) / t));
} else if (t <= 8e-125) {
tmp = x + ((y - x) / (a / z));
} else {
tmp = y / ((t - a) / (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.9e+51: tmp = y - (x * ((a - z) / t)) elif t <= 8e-125: tmp = x + ((y - x) / (a / z)) else: tmp = y / ((t - a) / (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.9e+51) tmp = Float64(y - Float64(x * Float64(Float64(a - z) / t))); elseif (t <= 8e-125) tmp = Float64(x + Float64(Float64(y - x) / Float64(a / z))); else tmp = Float64(y / Float64(Float64(t - a) / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.9e+51) tmp = y - (x * ((a - z) / t)); elseif (t <= 8e-125) tmp = x + ((y - x) / (a / z)); else tmp = y / ((t - a) / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.9e+51], N[(y - N[(x * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e-125], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(N[(t - a), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{+51}:\\
\;\;\;\;y - x \cdot \frac{a - z}{t}\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-125}:\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{t - a}{t - z}}\\
\end{array}
\end{array}
if t < -1.8999999999999999e51Initial program 30.9%
Taylor expanded in t around inf 69.2%
associate--l+69.2%
distribute-lft-out--69.2%
div-sub69.2%
mul-1-neg69.2%
unsub-neg69.2%
div-sub69.2%
associate-/l*73.2%
associate-/l*77.5%
distribute-rgt-out--77.5%
Simplified77.5%
Taylor expanded in y around 0 71.3%
mul-1-neg71.3%
associate-/l*73.4%
distribute-lft-neg-in73.4%
Simplified73.4%
if -1.8999999999999999e51 < t < 8.0000000000000001e-125Initial program 86.2%
clear-num86.1%
associate-/r/86.1%
Applied egg-rr86.1%
*-commutative86.1%
associate-*l*98.2%
div-inv98.2%
clear-num98.2%
un-div-inv98.2%
Applied egg-rr98.2%
Taylor expanded in t around 0 78.0%
if 8.0000000000000001e-125 < t Initial program 55.8%
clear-num55.7%
associate-/r/55.7%
Applied egg-rr55.7%
*-commutative55.7%
associate-*l*81.7%
div-inv81.8%
clear-num81.8%
un-div-inv81.8%
Applied egg-rr81.8%
Taylor expanded in x around 0 46.8%
associate-/l*68.6%
Simplified68.6%
clear-num68.6%
un-div-inv68.6%
Applied egg-rr68.6%
Final simplification73.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.5e+51) (not (<= a 9.8e+35))) (+ x (* y (/ z a))) (* y (/ (- t z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.5e+51) || !(a <= 9.8e+35)) {
tmp = x + (y * (z / a));
} else {
tmp = y * ((t - 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 ((a <= (-5.5d+51)) .or. (.not. (a <= 9.8d+35))) then
tmp = x + (y * (z / a))
else
tmp = y * ((t - 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 ((a <= -5.5e+51) || !(a <= 9.8e+35)) {
tmp = x + (y * (z / a));
} else {
tmp = y * ((t - z) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.5e+51) or not (a <= 9.8e+35): tmp = x + (y * (z / a)) else: tmp = y * ((t - z) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.5e+51) || !(a <= 9.8e+35)) tmp = Float64(x + Float64(y * Float64(z / a))); else tmp = Float64(y * Float64(Float64(t - z) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.5e+51) || ~((a <= 9.8e+35))) tmp = x + (y * (z / a)); else tmp = y * ((t - z) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.5e+51], N[Not[LessEqual[a, 9.8e+35]], $MachinePrecision]], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(t - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{+51} \lor \neg \left(a \leq 9.8 \cdot 10^{+35}\right):\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t - z}{t}\\
\end{array}
\end{array}
if a < -5.5e51 or 9.8000000000000005e35 < a Initial program 70.1%
Taylor expanded in t around 0 59.7%
Taylor expanded in y around inf 60.2%
associate-/l*70.5%
Simplified70.5%
if -5.5e51 < a < 9.8000000000000005e35Initial program 62.2%
clear-num62.2%
associate-/r/62.2%
Applied egg-rr62.2%
*-commutative62.2%
associate-*l*79.4%
div-inv79.6%
clear-num79.5%
un-div-inv79.5%
Applied egg-rr79.5%
Taylor expanded in x around 0 48.7%
associate-/l*64.6%
Simplified64.6%
Taylor expanded in a around 0 56.7%
mul-1-neg56.7%
Simplified56.7%
Final simplification62.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1e+54) (not (<= a 3.45e+34))) (+ x (* y (/ z a))) (* y (- 1.0 (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1e+54) || !(a <= 3.45e+34)) {
tmp = x + (y * (z / a));
} else {
tmp = y * (1.0 - (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 ((a <= (-1d+54)) .or. (.not. (a <= 3.45d+34))) then
tmp = x + (y * (z / a))
else
tmp = y * (1.0d0 - (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 ((a <= -1e+54) || !(a <= 3.45e+34)) {
tmp = x + (y * (z / a));
} else {
tmp = y * (1.0 - (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1e+54) or not (a <= 3.45e+34): tmp = x + (y * (z / a)) else: tmp = y * (1.0 - (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1e+54) || !(a <= 3.45e+34)) tmp = Float64(x + Float64(y * Float64(z / a))); else tmp = Float64(y * Float64(1.0 - Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1e+54) || ~((a <= 3.45e+34))) tmp = x + (y * (z / a)); else tmp = y * (1.0 - (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1e+54], N[Not[LessEqual[a, 3.45e+34]], $MachinePrecision]], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{+54} \lor \neg \left(a \leq 3.45 \cdot 10^{+34}\right):\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\end{array}
\end{array}
if a < -1.0000000000000001e54 or 3.45000000000000019e34 < a Initial program 70.1%
Taylor expanded in t around 0 59.7%
Taylor expanded in y around inf 60.2%
associate-/l*70.5%
Simplified70.5%
if -1.0000000000000001e54 < a < 3.45000000000000019e34Initial program 62.2%
clear-num62.2%
associate-/r/62.2%
Applied egg-rr62.2%
*-commutative62.2%
associate-*l*79.4%
div-inv79.6%
clear-num79.5%
un-div-inv79.5%
Applied egg-rr79.5%
Taylor expanded in x around 0 48.7%
associate-/l*64.6%
Simplified64.6%
Taylor expanded in a around 0 56.7%
mul-1-neg56.7%
div-sub56.7%
sub-neg56.7%
*-inverses56.7%
metadata-eval56.7%
Simplified56.7%
Final simplification62.2%
(FPCore (x y z t a) :precision binary64 (if (<= t -6.8e+65) y (if (<= t 3.6e+104) (+ x (* y (/ z a))) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.8e+65) {
tmp = y;
} else if (t <= 3.6e+104) {
tmp = x + (y * (z / a));
} else {
tmp = 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 <= (-6.8d+65)) then
tmp = y
else if (t <= 3.6d+104) then
tmp = x + (y * (z / a))
else
tmp = 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 <= -6.8e+65) {
tmp = y;
} else if (t <= 3.6e+104) {
tmp = x + (y * (z / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.8e+65: tmp = y elif t <= 3.6e+104: tmp = x + (y * (z / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.8e+65) tmp = y; elseif (t <= 3.6e+104) tmp = Float64(x + Float64(y * Float64(z / a))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6.8e+65) tmp = y; elseif (t <= 3.6e+104) tmp = x + (y * (z / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.8e+65], y, If[LessEqual[t, 3.6e+104], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{+65}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+104}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -6.7999999999999999e65 or 3.60000000000000001e104 < t Initial program 27.5%
Taylor expanded in t around inf 64.2%
if -6.7999999999999999e65 < t < 3.60000000000000001e104Initial program 83.8%
Taylor expanded in t around 0 59.2%
Taylor expanded in y around inf 49.9%
associate-/l*56.0%
Simplified56.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -8.4e+68) y (if (<= t 4.5e+104) (* x (- 1.0 (/ z a))) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8.4e+68) {
tmp = y;
} else if (t <= 4.5e+104) {
tmp = x * (1.0 - (z / a));
} else {
tmp = 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 <= (-8.4d+68)) then
tmp = y
else if (t <= 4.5d+104) then
tmp = x * (1.0d0 - (z / a))
else
tmp = 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 <= -8.4e+68) {
tmp = y;
} else if (t <= 4.5e+104) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -8.4e+68: tmp = y elif t <= 4.5e+104: tmp = x * (1.0 - (z / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -8.4e+68) tmp = y; elseif (t <= 4.5e+104) tmp = Float64(x * Float64(1.0 - Float64(z / a))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -8.4e+68) tmp = y; elseif (t <= 4.5e+104) tmp = x * (1.0 - (z / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8.4e+68], y, If[LessEqual[t, 4.5e+104], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.4 \cdot 10^{+68}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+104}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -8.40000000000000003e68 or 4.4999999999999998e104 < t Initial program 26.6%
Taylor expanded in t around inf 65.0%
if -8.40000000000000003e68 < t < 4.4999999999999998e104Initial program 83.9%
Taylor expanded in t around 0 58.9%
Taylor expanded in x around inf 47.0%
mul-1-neg47.0%
unsub-neg47.0%
Simplified47.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.06e+148) (not (<= z 2e-36))) (* y (/ z a)) (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.06e+148) || !(z <= 2e-36)) {
tmp = y * (z / a);
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.06d+148)) .or. (.not. (z <= 2d-36))) then
tmp = y * (z / a)
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.06e+148) || !(z <= 2e-36)) {
tmp = y * (z / a);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.06e+148) or not (z <= 2e-36): tmp = y * (z / a) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.06e+148) || !(z <= 2e-36)) tmp = Float64(y * Float64(z / a)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.06e+148) || ~((z <= 2e-36))) tmp = y * (z / a); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.06e+148], N[Not[LessEqual[z, 2e-36]], $MachinePrecision]], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.06 \cdot 10^{+148} \lor \neg \left(z \leq 2 \cdot 10^{-36}\right):\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.06e148 or 1.9999999999999999e-36 < z Initial program 66.4%
clear-num66.3%
associate-/r/66.3%
Applied egg-rr66.3%
*-commutative66.3%
associate-*l*93.6%
div-inv93.7%
clear-num93.6%
un-div-inv93.7%
Applied egg-rr93.7%
Taylor expanded in x around 0 41.6%
associate-/l*59.6%
Simplified59.6%
Taylor expanded in t around 0 30.9%
associate-/l*41.0%
Simplified41.0%
if -1.06e148 < z < 1.9999999999999999e-36Initial program 64.7%
Taylor expanded in y around inf 57.7%
*-commutative57.7%
Simplified57.7%
Taylor expanded in t around inf 47.6%
Final simplification44.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.7e+53) x (if (<= a 310000.0) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.7e+53) {
tmp = x;
} else if (a <= 310000.0) {
tmp = 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 <= (-1.7d+53)) then
tmp = x
else if (a <= 310000.0d0) then
tmp = 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 <= -1.7e+53) {
tmp = x;
} else if (a <= 310000.0) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.7e+53: tmp = x elif a <= 310000.0: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.7e+53) tmp = x; elseif (a <= 310000.0) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.7e+53) tmp = x; elseif (a <= 310000.0) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.7e+53], x, If[LessEqual[a, 310000.0], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.7 \cdot 10^{+53}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 310000:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.69999999999999999e53 or 3.1e5 < a Initial program 72.7%
Taylor expanded in a around inf 41.7%
if -1.69999999999999999e53 < a < 3.1e5Initial program 59.6%
Taylor expanded in t around inf 42.9%
(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 65.4%
Taylor expanded in a around inf 23.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(if (< a -1.6153062845442575e-142)
t_1
(if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} 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 - x) / 1.0d0) * ((z - t) / (a - t)))
if (a < (-1.6153062845442575d-142)) then
tmp = t_1
else if (a < 3.774403170083174d-182) then
tmp = y - ((z / t) * (y - x))
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 - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))) tmp = 0 if a < -1.6153062845442575e-142: tmp = t_1 elif a < 3.774403170083174e-182: tmp = y - ((z / t) * (y - x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))); tmp = 0.0; if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = y - ((z / t) * (y - x)); 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 - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024106
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:alt
(if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))