
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\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 x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (or (<= t_1 -4e-286) (not (<= t_1 0.0)))
(+ x (* (- t x) (/ (- y z) (- a z))))
(+ t (/ (* (- y a) (- x t)) z)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if ((t_1 <= -4e-286) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) * ((y - z) / (a - z)));
} else {
tmp = t + (((y - a) * (x - 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) :: t_1
real(8) :: tmp
t_1 = x + (((y - z) * (t - x)) / (a - z))
if ((t_1 <= (-4d-286)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) * ((y - z) / (a - z)))
else
tmp = t + (((y - a) * (x - t)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if ((t_1 <= -4e-286) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) * ((y - z) / (a - z)));
} else {
tmp = t + (((y - a) * (x - t)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if (t_1 <= -4e-286) or not (t_1 <= 0.0): tmp = x + ((t - x) * ((y - z) / (a - z))) else: tmp = t + (((y - a) * (x - t)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if ((t_1 <= -4e-286) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(t + Float64(Float64(Float64(y - a) * Float64(x - t)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if ((t_1 <= -4e-286) || ~((t_1 <= 0.0))) tmp = x + ((t - x) * ((y - z) / (a - z))); else tmp = t + (((y - a) * (x - t)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e-286], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(y - a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{-286} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(y - a\right) \cdot \left(x - t\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.0000000000000002e-286 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 73.5%
associate-*l/91.4%
Simplified91.4%
if -4.0000000000000002e-286 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 4.4%
associate-*l/4.4%
Simplified4.4%
Taylor expanded in z around -inf 99.7%
+-commutative99.7%
sub-neg99.7%
mul-1-neg99.7%
+-commutative99.7%
mul-1-neg99.7%
unsub-neg99.7%
+-commutative99.7%
mul-1-neg99.7%
sub-neg99.7%
distribute-rgt-out--99.7%
Simplified99.7%
Final simplification92.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ y z)))))
(if (<= z -3.1e+114)
t_1
(if (<= z 1.6e+19)
(* x (- 1.0 (/ y a)))
(if (<= z 2.1e+102)
t_1
(if (<= z 2.8e+139)
(+ x t)
(if (<= z 3.5e+190) (* y (/ x z)) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (z <= -3.1e+114) {
tmp = t_1;
} else if (z <= 1.6e+19) {
tmp = x * (1.0 - (y / a));
} else if (z <= 2.1e+102) {
tmp = t_1;
} else if (z <= 2.8e+139) {
tmp = x + t;
} else if (z <= 3.5e+190) {
tmp = y * (x / z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * (1.0d0 - (y / z))
if (z <= (-3.1d+114)) then
tmp = t_1
else if (z <= 1.6d+19) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 2.1d+102) then
tmp = t_1
else if (z <= 2.8d+139) then
tmp = x + t
else if (z <= 3.5d+190) then
tmp = y * (x / z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (z <= -3.1e+114) {
tmp = t_1;
} else if (z <= 1.6e+19) {
tmp = x * (1.0 - (y / a));
} else if (z <= 2.1e+102) {
tmp = t_1;
} else if (z <= 2.8e+139) {
tmp = x + t;
} else if (z <= 3.5e+190) {
tmp = y * (x / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (1.0 - (y / z)) tmp = 0 if z <= -3.1e+114: tmp = t_1 elif z <= 1.6e+19: tmp = x * (1.0 - (y / a)) elif z <= 2.1e+102: tmp = t_1 elif z <= 2.8e+139: tmp = x + t elif z <= 3.5e+190: tmp = y * (x / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -3.1e+114) tmp = t_1; elseif (z <= 1.6e+19) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 2.1e+102) tmp = t_1; elseif (z <= 2.8e+139) tmp = Float64(x + t); elseif (z <= 3.5e+190) tmp = Float64(y * Float64(x / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (1.0 - (y / z)); tmp = 0.0; if (z <= -3.1e+114) tmp = t_1; elseif (z <= 1.6e+19) tmp = x * (1.0 - (y / a)); elseif (z <= 2.1e+102) tmp = t_1; elseif (z <= 2.8e+139) tmp = x + t; elseif (z <= 3.5e+190) tmp = y * (x / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e+114], t$95$1, If[LessEqual[z, 1.6e+19], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+102], t$95$1, If[LessEqual[z, 2.8e+139], N[(x + t), $MachinePrecision], If[LessEqual[z, 3.5e+190], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{+114}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+19}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+139}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+190}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.1e114 or 1.6e19 < z < 2.10000000000000001e102 or 3.4999999999999999e190 < z Initial program 36.3%
associate-*l/71.0%
Simplified71.0%
Taylor expanded in a around 0 25.1%
associate-*r/25.1%
neg-mul-125.1%
*-commutative25.1%
distribute-rgt-neg-in25.1%
Simplified25.1%
Taylor expanded in t around inf 70.5%
if -3.1e114 < z < 1.6e19Initial program 88.6%
associate-*l/94.5%
Simplified94.5%
Taylor expanded in z around 0 73.9%
Taylor expanded in t around 0 57.5%
mul-1-neg57.5%
associate-/l*58.6%
distribute-neg-frac58.6%
Simplified58.6%
Taylor expanded in x around 0 59.7%
mul-1-neg59.7%
sub-neg59.7%
*-commutative59.7%
Simplified59.7%
if 2.10000000000000001e102 < z < 2.7999999999999998e139Initial program 25.7%
clear-num25.7%
associate-/r/25.7%
Applied egg-rr25.7%
Taylor expanded in t around inf 41.4%
Taylor expanded in z around inf 79.4%
if 2.7999999999999998e139 < z < 3.4999999999999999e190Initial program 22.6%
associate-*l/42.5%
Simplified42.5%
Taylor expanded in a around 0 22.6%
associate-*r/22.6%
neg-mul-122.6%
*-commutative22.6%
distribute-rgt-neg-in22.6%
Simplified22.6%
Taylor expanded in x around -inf 33.6%
associate-/l*43.0%
Simplified43.0%
Taylor expanded in y around 0 33.6%
associate-*r/43.3%
Simplified43.3%
Final simplification62.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ y z)))))
(if (<= z -3e+114)
t_1
(if (<= z -1e+32)
(+ x (* y (/ t a)))
(if (<= z -1.65e-22)
(/ (* x (- y)) (- a z))
(if (<= z -1.1e-197)
(* x (- 1.0 (/ y a)))
(if (<= z 440000000.0) (+ x (* t (/ y a))) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (z <= -3e+114) {
tmp = t_1;
} else if (z <= -1e+32) {
tmp = x + (y * (t / a));
} else if (z <= -1.65e-22) {
tmp = (x * -y) / (a - z);
} else if (z <= -1.1e-197) {
tmp = x * (1.0 - (y / a));
} else if (z <= 440000000.0) {
tmp = x + (t * (y / a));
} 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 = t * (1.0d0 - (y / z))
if (z <= (-3d+114)) then
tmp = t_1
else if (z <= (-1d+32)) then
tmp = x + (y * (t / a))
else if (z <= (-1.65d-22)) then
tmp = (x * -y) / (a - z)
else if (z <= (-1.1d-197)) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 440000000.0d0) then
tmp = x + (t * (y / a))
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 = t * (1.0 - (y / z));
double tmp;
if (z <= -3e+114) {
tmp = t_1;
} else if (z <= -1e+32) {
tmp = x + (y * (t / a));
} else if (z <= -1.65e-22) {
tmp = (x * -y) / (a - z);
} else if (z <= -1.1e-197) {
tmp = x * (1.0 - (y / a));
} else if (z <= 440000000.0) {
tmp = x + (t * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (1.0 - (y / z)) tmp = 0 if z <= -3e+114: tmp = t_1 elif z <= -1e+32: tmp = x + (y * (t / a)) elif z <= -1.65e-22: tmp = (x * -y) / (a - z) elif z <= -1.1e-197: tmp = x * (1.0 - (y / a)) elif z <= 440000000.0: tmp = x + (t * (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -3e+114) tmp = t_1; elseif (z <= -1e+32) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= -1.65e-22) tmp = Float64(Float64(x * Float64(-y)) / Float64(a - z)); elseif (z <= -1.1e-197) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 440000000.0) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (1.0 - (y / z)); tmp = 0.0; if (z <= -3e+114) tmp = t_1; elseif (z <= -1e+32) tmp = x + (y * (t / a)); elseif (z <= -1.65e-22) tmp = (x * -y) / (a - z); elseif (z <= -1.1e-197) tmp = x * (1.0 - (y / a)); elseif (z <= 440000000.0) tmp = x + (t * (y / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e+114], t$95$1, If[LessEqual[z, -1e+32], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.65e-22], N[(N[(x * (-y)), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.1e-197], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 440000000.0], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -3 \cdot 10^{+114}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1 \cdot 10^{+32}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{-22}:\\
\;\;\;\;\frac{x \cdot \left(-y\right)}{a - z}\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-197}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 440000000:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3e114 or 4.4e8 < z Initial program 34.9%
associate-*l/69.8%
Simplified69.8%
Taylor expanded in a around 0 25.4%
associate-*r/25.4%
neg-mul-125.4%
*-commutative25.4%
distribute-rgt-neg-in25.4%
Simplified25.4%
Taylor expanded in t around inf 61.5%
if -3e114 < z < -1.00000000000000005e32Initial program 55.6%
associate-*l/93.5%
Simplified93.5%
Taylor expanded in z around 0 61.7%
Taylor expanded in t around inf 49.4%
expm1-log1p-u49.2%
expm1-udef49.3%
associate-/l*54.9%
Applied egg-rr54.9%
expm1-def54.8%
expm1-log1p62.1%
associate-/r/61.7%
*-commutative61.7%
associate-*r/49.4%
*-commutative49.4%
associate-*r/62.1%
Simplified62.1%
if -1.00000000000000005e32 < z < -1.65e-22Initial program 86.0%
associate-*l/86.0%
Simplified86.0%
Taylor expanded in y around -inf 72.4%
Taylor expanded in t around 0 64.9%
associate-*r/64.9%
mul-1-neg64.9%
distribute-rgt-neg-out64.9%
Simplified64.9%
if -1.65e-22 < z < -1.1e-197Initial program 95.5%
associate-*l/92.8%
Simplified92.8%
Taylor expanded in z around 0 70.8%
Taylor expanded in t around 0 65.4%
mul-1-neg65.4%
associate-/l*65.1%
distribute-neg-frac65.1%
Simplified65.1%
Taylor expanded in x around 0 67.9%
mul-1-neg67.9%
sub-neg67.9%
*-commutative67.9%
Simplified67.9%
if -1.1e-197 < z < 4.4e8Initial program 91.5%
clear-num91.5%
associate-/r/91.5%
Applied egg-rr91.5%
Taylor expanded in t around inf 78.7%
Taylor expanded in z around 0 68.6%
associate-*l/73.1%
Simplified73.1%
Final simplification67.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (+ x (* y (/ t a)))))
(if (<= a -1.4e+83)
t_2
(if (<= a -6.1e-193)
t_1
(if (<= a 8.2e-151)
(* y (/ (- t x) (- a z)))
(if (<= a 9e+69) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = x + (y * (t / a));
double tmp;
if (a <= -1.4e+83) {
tmp = t_2;
} else if (a <= -6.1e-193) {
tmp = t_1;
} else if (a <= 8.2e-151) {
tmp = y * ((t - x) / (a - z));
} else if (a <= 9e+69) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
t_2 = x + (y * (t / a))
if (a <= (-1.4d+83)) then
tmp = t_2
else if (a <= (-6.1d-193)) then
tmp = t_1
else if (a <= 8.2d-151) then
tmp = y * ((t - x) / (a - z))
else if (a <= 9d+69) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = x + (y * (t / a));
double tmp;
if (a <= -1.4e+83) {
tmp = t_2;
} else if (a <= -6.1e-193) {
tmp = t_1;
} else if (a <= 8.2e-151) {
tmp = y * ((t - x) / (a - z));
} else if (a <= 9e+69) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) t_2 = x + (y * (t / a)) tmp = 0 if a <= -1.4e+83: tmp = t_2 elif a <= -6.1e-193: tmp = t_1 elif a <= 8.2e-151: tmp = y * ((t - x) / (a - z)) elif a <= 9e+69: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) t_2 = Float64(x + Float64(y * Float64(t / a))) tmp = 0.0 if (a <= -1.4e+83) tmp = t_2; elseif (a <= -6.1e-193) tmp = t_1; elseif (a <= 8.2e-151) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); elseif (a <= 9e+69) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); t_2 = x + (y * (t / a)); tmp = 0.0; if (a <= -1.4e+83) tmp = t_2; elseif (a <= -6.1e-193) tmp = t_1; elseif (a <= 8.2e-151) tmp = y * ((t - x) / (a - z)); elseif (a <= 9e+69) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.4e+83], t$95$2, If[LessEqual[a, -6.1e-193], t$95$1, If[LessEqual[a, 8.2e-151], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9e+69], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x + y \cdot \frac{t}{a}\\
\mathbf{if}\;a \leq -1.4 \cdot 10^{+83}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -6.1 \cdot 10^{-193}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 8.2 \cdot 10^{-151}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;a \leq 9 \cdot 10^{+69}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -1.4e83 or 8.9999999999999999e69 < a Initial program 75.2%
associate-*l/97.6%
Simplified97.6%
Taylor expanded in z around 0 80.7%
Taylor expanded in t around inf 71.7%
expm1-log1p-u68.5%
expm1-udef64.7%
associate-/l*67.0%
Applied egg-rr67.0%
expm1-def70.8%
expm1-log1p77.9%
associate-/r/76.9%
*-commutative76.9%
associate-*r/71.7%
*-commutative71.7%
associate-*r/77.9%
Simplified77.9%
if -1.4e83 < a < -6.10000000000000012e-193 or 8.2000000000000002e-151 < a < 8.9999999999999999e69Initial program 58.7%
associate-*l/74.3%
Simplified74.3%
Taylor expanded in x around 0 43.7%
associate-*r/61.0%
Simplified61.0%
if -6.10000000000000012e-193 < a < 8.2000000000000002e-151Initial program 73.5%
associate-*l/80.6%
Simplified80.6%
Taylor expanded in y around inf 72.3%
div-sub72.3%
*-commutative72.3%
Simplified72.3%
Final simplification70.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (/ y (/ z (- t x))))))
(if (<= z -1.8e+154)
t_1
(if (<= z 1.95e+59)
(+ x (* (- t x) (/ y (- a z))))
(if (<= z 8.8e+203) (+ t (/ (* (- y a) (- x t)) z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (y / (z / (t - x)));
double tmp;
if (z <= -1.8e+154) {
tmp = t_1;
} else if (z <= 1.95e+59) {
tmp = x + ((t - x) * (y / (a - z)));
} else if (z <= 8.8e+203) {
tmp = t + (((y - a) * (x - t)) / z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t - (y / (z / (t - x)))
if (z <= (-1.8d+154)) then
tmp = t_1
else if (z <= 1.95d+59) then
tmp = x + ((t - x) * (y / (a - z)))
else if (z <= 8.8d+203) then
tmp = t + (((y - a) * (x - t)) / z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - (y / (z / (t - x)));
double tmp;
if (z <= -1.8e+154) {
tmp = t_1;
} else if (z <= 1.95e+59) {
tmp = x + ((t - x) * (y / (a - z)));
} else if (z <= 8.8e+203) {
tmp = t + (((y - a) * (x - t)) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - (y / (z / (t - x))) tmp = 0 if z <= -1.8e+154: tmp = t_1 elif z <= 1.95e+59: tmp = x + ((t - x) * (y / (a - z))) elif z <= 8.8e+203: tmp = t + (((y - a) * (x - t)) / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(y / Float64(z / Float64(t - x)))) tmp = 0.0 if (z <= -1.8e+154) tmp = t_1; elseif (z <= 1.95e+59) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / Float64(a - z)))); elseif (z <= 8.8e+203) tmp = Float64(t + Float64(Float64(Float64(y - a) * Float64(x - t)) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - (y / (z / (t - x))); tmp = 0.0; if (z <= -1.8e+154) tmp = t_1; elseif (z <= 1.95e+59) tmp = x + ((t - x) * (y / (a - z))); elseif (z <= 8.8e+203) tmp = t + (((y - a) * (x - t)) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(y / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+154], t$95$1, If[LessEqual[z, 1.95e+59], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.8e+203], N[(t + N[(N[(N[(y - a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{\frac{z}{t - x}}\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+154}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+59}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{+203}:\\
\;\;\;\;t + \frac{\left(y - a\right) \cdot \left(x - t\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.8e154 or 8.80000000000000018e203 < z Initial program 22.6%
associate-*l/70.3%
Simplified70.3%
Taylor expanded in a around 0 22.4%
associate-*r/22.4%
neg-mul-122.4%
*-commutative22.4%
distribute-rgt-neg-in22.4%
Simplified22.4%
Taylor expanded in y around 0 68.2%
+-commutative68.2%
mul-1-neg68.2%
unsub-neg68.2%
associate-/l*91.8%
Simplified91.8%
if -1.8e154 < z < 1.95000000000000011e59Initial program 87.0%
associate-*l/93.4%
Simplified93.4%
Taylor expanded in y around inf 84.0%
if 1.95000000000000011e59 < z < 8.80000000000000018e203Initial program 33.1%
associate-*l/61.4%
Simplified61.4%
Taylor expanded in z around -inf 73.8%
+-commutative73.8%
sub-neg73.8%
mul-1-neg73.8%
+-commutative73.8%
mul-1-neg73.8%
unsub-neg73.8%
+-commutative73.8%
mul-1-neg73.8%
sub-neg73.8%
distribute-rgt-out--74.0%
Simplified74.0%
Final simplification84.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -4.3e+111)
t_1
(if (<= z -1.7e-200)
(* x (- 1.0 (/ y a)))
(if (<= z 5.8e-54) (+ x (* t (/ y a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (z <= -4.3e+111) {
tmp = t_1;
} else if (z <= -1.7e-200) {
tmp = x * (1.0 - (y / a));
} else if (z <= 5.8e-54) {
tmp = x + (t * (y / a));
} 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 = t * ((y - z) / (a - z))
if (z <= (-4.3d+111)) then
tmp = t_1
else if (z <= (-1.7d-200)) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 5.8d-54) then
tmp = x + (t * (y / a))
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 = t * ((y - z) / (a - z));
double tmp;
if (z <= -4.3e+111) {
tmp = t_1;
} else if (z <= -1.7e-200) {
tmp = x * (1.0 - (y / a));
} else if (z <= 5.8e-54) {
tmp = x + (t * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) tmp = 0 if z <= -4.3e+111: tmp = t_1 elif z <= -1.7e-200: tmp = x * (1.0 - (y / a)) elif z <= 5.8e-54: tmp = x + (t * (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -4.3e+111) tmp = t_1; elseif (z <= -1.7e-200) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 5.8e-54) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -4.3e+111) tmp = t_1; elseif (z <= -1.7e-200) tmp = x * (1.0 - (y / a)); elseif (z <= 5.8e-54) tmp = x + (t * (y / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.3e+111], t$95$1, If[LessEqual[z, -1.7e-200], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e-54], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -4.3 \cdot 10^{+111}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-200}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-54}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4.29999999999999993e111 or 5.80000000000000029e-54 < z Initial program 39.3%
associate-*l/71.7%
Simplified71.7%
Taylor expanded in x around 0 38.3%
associate-*r/66.7%
Simplified66.7%
if -4.29999999999999993e111 < z < -1.7000000000000001e-200Initial program 84.1%
associate-*l/91.5%
Simplified91.5%
Taylor expanded in z around 0 64.5%
Taylor expanded in t around 0 57.1%
mul-1-neg57.1%
associate-/l*56.9%
distribute-neg-frac56.9%
Simplified56.9%
Taylor expanded in x around 0 58.4%
mul-1-neg58.4%
sub-neg58.4%
*-commutative58.4%
Simplified58.4%
if -1.7000000000000001e-200 < z < 5.80000000000000029e-54Initial program 92.7%
clear-num92.8%
associate-/r/92.7%
Applied egg-rr92.7%
Taylor expanded in t around inf 79.5%
Taylor expanded in z around 0 72.7%
associate-*l/76.6%
Simplified76.6%
Final simplification68.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.7e+31)
(+ x (/ t (/ a (- y z))))
(if (<= a 6.5e-136)
(- t (/ y (/ z (- t x))))
(if (<= a 4.5e+44) (* t (/ (- y z) (- a z))) (+ x (* (- t x) (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.7e+31) {
tmp = x + (t / (a / (y - z)));
} else if (a <= 6.5e-136) {
tmp = t - (y / (z / (t - x)));
} else if (a <= 4.5e+44) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) * (y / 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 (a <= (-2.7d+31)) then
tmp = x + (t / (a / (y - z)))
else if (a <= 6.5d-136) then
tmp = t - (y / (z / (t - x)))
else if (a <= 4.5d+44) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + ((t - x) * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.7e+31) {
tmp = x + (t / (a / (y - z)));
} else if (a <= 6.5e-136) {
tmp = t - (y / (z / (t - x)));
} else if (a <= 4.5e+44) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.7e+31: tmp = x + (t / (a / (y - z))) elif a <= 6.5e-136: tmp = t - (y / (z / (t - x))) elif a <= 4.5e+44: tmp = t * ((y - z) / (a - z)) else: tmp = x + ((t - x) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.7e+31) tmp = Float64(x + Float64(t / Float64(a / Float64(y - z)))); elseif (a <= 6.5e-136) tmp = Float64(t - Float64(y / Float64(z / Float64(t - x)))); elseif (a <= 4.5e+44) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.7e+31) tmp = x + (t / (a / (y - z))); elseif (a <= 6.5e-136) tmp = t - (y / (z / (t - x))); elseif (a <= 4.5e+44) tmp = t * ((y - z) / (a - z)); else tmp = x + ((t - x) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.7e+31], N[(x + N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e-136], N[(t - N[(y / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.5e+44], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.7 \cdot 10^{+31}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y - z}}\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-136}:\\
\;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{+44}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if a < -2.69999999999999986e31Initial program 79.3%
clear-num79.3%
associate-/r/79.2%
Applied egg-rr79.2%
Taylor expanded in t around inf 79.1%
Taylor expanded in a around inf 74.7%
associate-/l*80.0%
Simplified80.0%
if -2.69999999999999986e31 < a < 6.50000000000000011e-136Initial program 64.8%
associate-*l/76.9%
Simplified76.9%
Taylor expanded in a around 0 47.5%
associate-*r/47.5%
neg-mul-147.5%
*-commutative47.5%
distribute-rgt-neg-in47.5%
Simplified47.5%
Taylor expanded in y around 0 70.7%
+-commutative70.7%
mul-1-neg70.7%
unsub-neg70.7%
associate-/l*75.8%
Simplified75.8%
if 6.50000000000000011e-136 < a < 4.5e44Initial program 53.0%
associate-*l/67.2%
Simplified67.2%
Taylor expanded in x around 0 41.3%
associate-*r/65.4%
Simplified65.4%
if 4.5e44 < a Initial program 70.0%
associate-*l/93.8%
Simplified93.8%
Taylor expanded in z around 0 77.9%
Final simplification76.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.1e+156) (not (<= z 1.7e+68))) (- t (/ y (/ z (- t x)))) (+ x (* (- t x) (/ y (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.1e+156) || !(z <= 1.7e+68)) {
tmp = t - (y / (z / (t - x)));
} else {
tmp = x + ((t - x) * (y / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.1d+156)) .or. (.not. (z <= 1.7d+68))) then
tmp = t - (y / (z / (t - x)))
else
tmp = x + ((t - x) * (y / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.1e+156) || !(z <= 1.7e+68)) {
tmp = t - (y / (z / (t - x)));
} else {
tmp = x + ((t - x) * (y / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.1e+156) or not (z <= 1.7e+68): tmp = t - (y / (z / (t - x))) else: tmp = x + ((t - x) * (y / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.1e+156) || !(z <= 1.7e+68)) tmp = Float64(t - Float64(y / Float64(z / Float64(t - x)))); else tmp = Float64(x + Float64(Float64(t - x) * Float64(y / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.1e+156) || ~((z <= 1.7e+68))) tmp = t - (y / (z / (t - x))); else tmp = x + ((t - x) * (y / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.1e+156], N[Not[LessEqual[z, 1.7e+68]], $MachinePrecision]], N[(t - N[(y / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+156} \lor \neg \left(z \leq 1.7 \cdot 10^{+68}\right):\\
\;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if z < -1.10000000000000002e156 or 1.70000000000000008e68 < z Initial program 25.2%
associate-*l/66.4%
Simplified66.4%
Taylor expanded in a around 0 23.5%
associate-*r/23.5%
neg-mul-123.5%
*-commutative23.5%
distribute-rgt-neg-in23.5%
Simplified23.5%
Taylor expanded in y around 0 65.7%
+-commutative65.7%
mul-1-neg65.7%
unsub-neg65.7%
associate-/l*81.1%
Simplified81.1%
if -1.10000000000000002e156 < z < 1.70000000000000008e68Initial program 86.3%
associate-*l/93.0%
Simplified93.0%
Taylor expanded in y around inf 83.3%
Final simplification82.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ y z)))))
(if (<= z -4.3e+111)
t_1
(if (<= z -2e-196)
(* x (- 1.0 (/ y a)))
(if (<= z 90000000000.0) (+ x (* y (/ t a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (z <= -4.3e+111) {
tmp = t_1;
} else if (z <= -2e-196) {
tmp = x * (1.0 - (y / a));
} else if (z <= 90000000000.0) {
tmp = x + (y * (t / a));
} 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 = t * (1.0d0 - (y / z))
if (z <= (-4.3d+111)) then
tmp = t_1
else if (z <= (-2d-196)) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 90000000000.0d0) then
tmp = x + (y * (t / a))
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 = t * (1.0 - (y / z));
double tmp;
if (z <= -4.3e+111) {
tmp = t_1;
} else if (z <= -2e-196) {
tmp = x * (1.0 - (y / a));
} else if (z <= 90000000000.0) {
tmp = x + (y * (t / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (1.0 - (y / z)) tmp = 0 if z <= -4.3e+111: tmp = t_1 elif z <= -2e-196: tmp = x * (1.0 - (y / a)) elif z <= 90000000000.0: tmp = x + (y * (t / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -4.3e+111) tmp = t_1; elseif (z <= -2e-196) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 90000000000.0) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (1.0 - (y / z)); tmp = 0.0; if (z <= -4.3e+111) tmp = t_1; elseif (z <= -2e-196) tmp = x * (1.0 - (y / a)); elseif (z <= 90000000000.0) tmp = x + (y * (t / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.3e+111], t$95$1, If[LessEqual[z, -2e-196], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 90000000000.0], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -4.3 \cdot 10^{+111}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-196}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 90000000000:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4.29999999999999993e111 or 9e10 < z Initial program 34.9%
associate-*l/69.8%
Simplified69.8%
Taylor expanded in a around 0 25.4%
associate-*r/25.4%
neg-mul-125.4%
*-commutative25.4%
distribute-rgt-neg-in25.4%
Simplified25.4%
Taylor expanded in t around inf 61.5%
if -4.29999999999999993e111 < z < -2.0000000000000001e-196Initial program 84.1%
associate-*l/91.5%
Simplified91.5%
Taylor expanded in z around 0 64.5%
Taylor expanded in t around 0 57.1%
mul-1-neg57.1%
associate-/l*56.9%
distribute-neg-frac56.9%
Simplified56.9%
Taylor expanded in x around 0 58.4%
mul-1-neg58.4%
sub-neg58.4%
*-commutative58.4%
Simplified58.4%
if -2.0000000000000001e-196 < z < 9e10Initial program 91.5%
associate-*l/96.4%
Simplified96.4%
Taylor expanded in z around 0 79.8%
Taylor expanded in t around inf 68.6%
expm1-log1p-u57.9%
expm1-udef53.2%
associate-/l*54.0%
Applied egg-rr54.0%
expm1-def58.8%
expm1-log1p70.6%
associate-/r/73.1%
*-commutative73.1%
associate-*r/68.6%
*-commutative68.6%
associate-*r/70.7%
Simplified70.7%
Final simplification64.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ y z)))))
(if (<= z -6.9e+112)
t_1
(if (<= z -2.1e-201)
(* x (- 1.0 (/ y a)))
(if (<= z 86000000000.0) (+ x (* t (/ y a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (z <= -6.9e+112) {
tmp = t_1;
} else if (z <= -2.1e-201) {
tmp = x * (1.0 - (y / a));
} else if (z <= 86000000000.0) {
tmp = x + (t * (y / a));
} 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 = t * (1.0d0 - (y / z))
if (z <= (-6.9d+112)) then
tmp = t_1
else if (z <= (-2.1d-201)) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 86000000000.0d0) then
tmp = x + (t * (y / a))
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 = t * (1.0 - (y / z));
double tmp;
if (z <= -6.9e+112) {
tmp = t_1;
} else if (z <= -2.1e-201) {
tmp = x * (1.0 - (y / a));
} else if (z <= 86000000000.0) {
tmp = x + (t * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (1.0 - (y / z)) tmp = 0 if z <= -6.9e+112: tmp = t_1 elif z <= -2.1e-201: tmp = x * (1.0 - (y / a)) elif z <= 86000000000.0: tmp = x + (t * (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -6.9e+112) tmp = t_1; elseif (z <= -2.1e-201) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 86000000000.0) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (1.0 - (y / z)); tmp = 0.0; if (z <= -6.9e+112) tmp = t_1; elseif (z <= -2.1e-201) tmp = x * (1.0 - (y / a)); elseif (z <= 86000000000.0) tmp = x + (t * (y / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.9e+112], t$95$1, If[LessEqual[z, -2.1e-201], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 86000000000.0], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -6.9 \cdot 10^{+112}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-201}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 86000000000:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -6.8999999999999999e112 or 8.6e10 < z Initial program 34.9%
associate-*l/69.8%
Simplified69.8%
Taylor expanded in a around 0 25.4%
associate-*r/25.4%
neg-mul-125.4%
*-commutative25.4%
distribute-rgt-neg-in25.4%
Simplified25.4%
Taylor expanded in t around inf 61.5%
if -6.8999999999999999e112 < z < -2.10000000000000012e-201Initial program 84.1%
associate-*l/91.5%
Simplified91.5%
Taylor expanded in z around 0 64.5%
Taylor expanded in t around 0 57.1%
mul-1-neg57.1%
associate-/l*56.9%
distribute-neg-frac56.9%
Simplified56.9%
Taylor expanded in x around 0 58.4%
mul-1-neg58.4%
sub-neg58.4%
*-commutative58.4%
Simplified58.4%
if -2.10000000000000012e-201 < z < 8.6e10Initial program 91.5%
clear-num91.5%
associate-/r/91.5%
Applied egg-rr91.5%
Taylor expanded in t around inf 78.7%
Taylor expanded in z around 0 68.6%
associate-*l/73.1%
Simplified73.1%
Final simplification65.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -7.4e+111) (not (<= z 5.2e-54))) (* t (/ (- y z) (- a z))) (+ x (* (- t x) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7.4e+111) || !(z <= 5.2e-54)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) * (y / 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 <= (-7.4d+111)) .or. (.not. (z <= 5.2d-54))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + ((t - x) * (y / 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 <= -7.4e+111) || !(z <= 5.2e-54)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -7.4e+111) or not (z <= 5.2e-54): tmp = t * ((y - z) / (a - z)) else: tmp = x + ((t - x) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -7.4e+111) || !(z <= 5.2e-54)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -7.4e+111) || ~((z <= 5.2e-54))) tmp = t * ((y - z) / (a - z)); else tmp = x + ((t - x) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7.4e+111], N[Not[LessEqual[z, 5.2e-54]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.4 \cdot 10^{+111} \lor \neg \left(z \leq 5.2 \cdot 10^{-54}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -7.4000000000000005e111 or 5.20000000000000004e-54 < z Initial program 39.3%
associate-*l/71.7%
Simplified71.7%
Taylor expanded in x around 0 38.3%
associate-*r/66.7%
Simplified66.7%
if -7.4000000000000005e111 < z < 5.20000000000000004e-54Initial program 89.1%
associate-*l/94.7%
Simplified94.7%
Taylor expanded in z around 0 75.1%
Final simplification71.6%
(FPCore (x y z t a)
:precision binary64
(if (<= a -5e+80)
x
(if (<= a -1.1e-196)
(+ x t)
(if (<= a 7e-151) (* y (/ x z)) (if (<= a 3.4e+69) t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5e+80) {
tmp = x;
} else if (a <= -1.1e-196) {
tmp = x + t;
} else if (a <= 7e-151) {
tmp = y * (x / z);
} else if (a <= 3.4e+69) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-5d+80)) then
tmp = x
else if (a <= (-1.1d-196)) then
tmp = x + t
else if (a <= 7d-151) then
tmp = y * (x / z)
else if (a <= 3.4d+69) then
tmp = t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5e+80) {
tmp = x;
} else if (a <= -1.1e-196) {
tmp = x + t;
} else if (a <= 7e-151) {
tmp = y * (x / z);
} else if (a <= 3.4e+69) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5e+80: tmp = x elif a <= -1.1e-196: tmp = x + t elif a <= 7e-151: tmp = y * (x / z) elif a <= 3.4e+69: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5e+80) tmp = x; elseif (a <= -1.1e-196) tmp = Float64(x + t); elseif (a <= 7e-151) tmp = Float64(y * Float64(x / z)); elseif (a <= 3.4e+69) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5e+80) tmp = x; elseif (a <= -1.1e-196) tmp = x + t; elseif (a <= 7e-151) tmp = y * (x / z); elseif (a <= 3.4e+69) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5e+80], x, If[LessEqual[a, -1.1e-196], N[(x + t), $MachinePrecision], If[LessEqual[a, 7e-151], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.4e+69], t, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5 \cdot 10^{+80}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.1 \cdot 10^{-196}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;a \leq 7 \cdot 10^{-151}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{+69}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.99999999999999961e80 or 3.39999999999999986e69 < a Initial program 75.5%
associate-*l/97.6%
Simplified97.6%
Taylor expanded in a around inf 64.5%
if -4.99999999999999961e80 < a < -1.10000000000000007e-196Initial program 60.9%
clear-num60.9%
associate-/r/60.9%
Applied egg-rr60.9%
Taylor expanded in t around inf 48.0%
Taylor expanded in z around inf 42.9%
if -1.10000000000000007e-196 < a < 6.99999999999999991e-151Initial program 73.0%
associate-*l/80.2%
Simplified80.2%
Taylor expanded in a around 0 63.5%
associate-*r/63.5%
neg-mul-163.5%
*-commutative63.5%
distribute-rgt-neg-in63.5%
Simplified63.5%
Taylor expanded in x around -inf 52.5%
associate-/l*52.3%
Simplified52.3%
Taylor expanded in y around 0 52.5%
associate-*r/52.4%
Simplified52.4%
if 6.99999999999999991e-151 < a < 3.39999999999999986e69Initial program 55.0%
associate-*l/65.7%
Simplified65.7%
Taylor expanded in z around inf 36.5%
Final simplification53.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -5e+80)
x
(if (<= a -8e-196)
(+ x t)
(if (<= a 9.5e-151) (* x (/ y z)) (if (<= a 1.3e+69) t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5e+80) {
tmp = x;
} else if (a <= -8e-196) {
tmp = x + t;
} else if (a <= 9.5e-151) {
tmp = x * (y / z);
} else if (a <= 1.3e+69) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-5d+80)) then
tmp = x
else if (a <= (-8d-196)) then
tmp = x + t
else if (a <= 9.5d-151) then
tmp = x * (y / z)
else if (a <= 1.3d+69) then
tmp = t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5e+80) {
tmp = x;
} else if (a <= -8e-196) {
tmp = x + t;
} else if (a <= 9.5e-151) {
tmp = x * (y / z);
} else if (a <= 1.3e+69) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5e+80: tmp = x elif a <= -8e-196: tmp = x + t elif a <= 9.5e-151: tmp = x * (y / z) elif a <= 1.3e+69: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5e+80) tmp = x; elseif (a <= -8e-196) tmp = Float64(x + t); elseif (a <= 9.5e-151) tmp = Float64(x * Float64(y / z)); elseif (a <= 1.3e+69) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5e+80) tmp = x; elseif (a <= -8e-196) tmp = x + t; elseif (a <= 9.5e-151) tmp = x * (y / z); elseif (a <= 1.3e+69) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5e+80], x, If[LessEqual[a, -8e-196], N[(x + t), $MachinePrecision], If[LessEqual[a, 9.5e-151], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.3e+69], t, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5 \cdot 10^{+80}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -8 \cdot 10^{-196}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{-151}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{+69}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.99999999999999961e80 or 1.3000000000000001e69 < a Initial program 75.5%
associate-*l/97.6%
Simplified97.6%
Taylor expanded in a around inf 64.5%
if -4.99999999999999961e80 < a < -8.0000000000000004e-196Initial program 60.9%
clear-num60.9%
associate-/r/60.9%
Applied egg-rr60.9%
Taylor expanded in t around inf 48.0%
Taylor expanded in z around inf 42.9%
if -8.0000000000000004e-196 < a < 9.4999999999999996e-151Initial program 73.0%
associate-*l/80.2%
Simplified80.2%
Taylor expanded in a around 0 63.5%
associate-*r/63.5%
neg-mul-163.5%
*-commutative63.5%
distribute-rgt-neg-in63.5%
Simplified63.5%
Taylor expanded in x around -inf 52.5%
associate-/l*52.3%
Simplified52.3%
associate-/r/54.1%
Applied egg-rr54.1%
if 9.4999999999999996e-151 < a < 1.3000000000000001e69Initial program 55.0%
associate-*l/65.7%
Simplified65.7%
Taylor expanded in z around inf 36.5%
Final simplification53.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.7e+154) t (if (<= z 8e+128) (* x (- 1.0 (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.7e+154) {
tmp = t;
} else if (z <= 8e+128) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-4.7d+154)) then
tmp = t
else if (z <= 8d+128) then
tmp = x * (1.0d0 - (y / a))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.7e+154) {
tmp = t;
} else if (z <= 8e+128) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.7e+154: tmp = t elif z <= 8e+128: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.7e+154) tmp = t; elseif (z <= 8e+128) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.7e+154) tmp = t; elseif (z <= 8e+128) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.7e+154], t, If[LessEqual[z, 8e+128], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.7 \cdot 10^{+154}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+128}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -4.69999999999999983e154 or 8.0000000000000006e128 < z Initial program 23.0%
associate-*l/66.1%
Simplified66.1%
Taylor expanded in z around inf 66.6%
if -4.69999999999999983e154 < z < 8.0000000000000006e128Initial program 83.2%
associate-*l/91.4%
Simplified91.4%
Taylor expanded in z around 0 67.3%
Taylor expanded in t around 0 51.5%
mul-1-neg51.5%
associate-/l*53.9%
distribute-neg-frac53.9%
Simplified53.9%
Taylor expanded in x around 0 54.8%
mul-1-neg54.8%
sub-neg54.8%
*-commutative54.8%
Simplified54.8%
Final simplification57.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.3e+15) x (if (<= a 9.5e+69) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.3e+15) {
tmp = x;
} else if (a <= 9.5e+69) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.3d+15)) then
tmp = x
else if (a <= 9.5d+69) then
tmp = t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.3e+15) {
tmp = x;
} else if (a <= 9.5e+69) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.3e+15: tmp = x elif a <= 9.5e+69: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.3e+15) tmp = x; elseif (a <= 9.5e+69) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.3e+15) tmp = x; elseif (a <= 9.5e+69) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.3e+15], x, If[LessEqual[a, 9.5e+69], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.3 \cdot 10^{+15}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{+69}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.3e15 or 9.4999999999999995e69 < a Initial program 76.5%
associate-*l/97.8%
Simplified97.8%
Taylor expanded in a around inf 61.7%
if -1.3e15 < a < 9.4999999999999995e69Initial program 61.8%
associate-*l/74.2%
Simplified74.2%
Taylor expanded in z around inf 33.7%
Final simplification46.9%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return 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 = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 68.6%
associate-*l/85.3%
Simplified85.3%
Taylor expanded in z around inf 23.5%
Final simplification23.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - 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 = t - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - 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 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023199
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))
(+ x (/ (* (- y z) (- t x)) (- a z))))