
(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 (if (or (<= z -2.4e+158) (not (<= z 1.7e+205))) (+ t (* (- t x) (/ (- a y) z))) (fma (- t x) (/ (- y z) (- a z)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.4e+158) || !(z <= 1.7e+205)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = fma((t - x), ((y - z) / (a - z)), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.4e+158) || !(z <= 1.7e+205)) tmp = Float64(t + Float64(Float64(t - x) * Float64(Float64(a - y) / z))); else tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.4e+158], N[Not[LessEqual[z, 1.7e+205]], $MachinePrecision]], N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+158} \lor \neg \left(z \leq 1.7 \cdot 10^{+205}\right):\\
\;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\end{array}
\end{array}
if z < -2.40000000000000008e158 or 1.7e205 < z Initial program 15.3%
associate-/l*53.8%
Simplified53.8%
add-cube-cbrt53.7%
fma-define53.8%
pow253.8%
*-commutative53.8%
associate-*l/15.4%
associate-*r/56.2%
Applied egg-rr56.2%
fma-undefine56.0%
unpow256.0%
add-cube-cbrt56.0%
*-commutative56.0%
associate-/r/53.7%
add-cube-cbrt53.0%
pow353.0%
+-commutative53.0%
associate-/r/55.2%
*-commutative55.2%
fma-define55.3%
Applied egg-rr55.3%
Taylor expanded in z around inf 70.0%
associate--l+70.0%
associate-*r/70.0%
associate-*r/70.0%
div-sub70.0%
distribute-lft-out--70.0%
distribute-rgt-out--70.0%
associate-*r/70.0%
neg-mul-170.0%
sub-neg70.0%
associate-*r/92.9%
Simplified92.9%
if -2.40000000000000008e158 < z < 1.7e205Initial program 81.3%
+-commutative81.3%
*-commutative81.3%
associate-/l*90.2%
fma-define90.2%
Simplified90.2%
Final simplification90.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ z (- z a)))))
(if (<= z -1.2e+92)
t_1
(if (<= z -7.2e+54)
(* x (/ (- y a) z))
(if (<= z -4e-45)
t_1
(if (<= z 3.4e-221)
(+ x (* t (/ y a)))
(if (<= z 1.35e+97) (* x (- 1.0 (/ y a))) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (z / (z - a));
double tmp;
if (z <= -1.2e+92) {
tmp = t_1;
} else if (z <= -7.2e+54) {
tmp = x * ((y - a) / z);
} else if (z <= -4e-45) {
tmp = t_1;
} else if (z <= 3.4e-221) {
tmp = x + (t * (y / a));
} else if (z <= 1.35e+97) {
tmp = x * (1.0 - (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 * (z / (z - a))
if (z <= (-1.2d+92)) then
tmp = t_1
else if (z <= (-7.2d+54)) then
tmp = x * ((y - a) / z)
else if (z <= (-4d-45)) then
tmp = t_1
else if (z <= 3.4d-221) then
tmp = x + (t * (y / a))
else if (z <= 1.35d+97) then
tmp = x * (1.0d0 - (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 * (z / (z - a));
double tmp;
if (z <= -1.2e+92) {
tmp = t_1;
} else if (z <= -7.2e+54) {
tmp = x * ((y - a) / z);
} else if (z <= -4e-45) {
tmp = t_1;
} else if (z <= 3.4e-221) {
tmp = x + (t * (y / a));
} else if (z <= 1.35e+97) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (z / (z - a)) tmp = 0 if z <= -1.2e+92: tmp = t_1 elif z <= -7.2e+54: tmp = x * ((y - a) / z) elif z <= -4e-45: tmp = t_1 elif z <= 3.4e-221: tmp = x + (t * (y / a)) elif z <= 1.35e+97: tmp = x * (1.0 - (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(z / Float64(z - a))) tmp = 0.0 if (z <= -1.2e+92) tmp = t_1; elseif (z <= -7.2e+54) tmp = Float64(x * Float64(Float64(y - a) / z)); elseif (z <= -4e-45) tmp = t_1; elseif (z <= 3.4e-221) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 1.35e+97) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (z / (z - a)); tmp = 0.0; if (z <= -1.2e+92) tmp = t_1; elseif (z <= -7.2e+54) tmp = x * ((y - a) / z); elseif (z <= -4e-45) tmp = t_1; elseif (z <= 3.4e-221) tmp = x + (t * (y / a)); elseif (z <= 1.35e+97) tmp = x * (1.0 - (y / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e+92], t$95$1, If[LessEqual[z, -7.2e+54], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4e-45], t$95$1, If[LessEqual[z, 3.4e-221], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+97], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{+54}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-221}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+97}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.20000000000000002e92 or -7.2000000000000003e54 < z < -3.99999999999999994e-45 or 1.34999999999999997e97 < z Initial program 35.5%
associate-/l*65.3%
Simplified65.3%
Taylor expanded in x around 0 36.4%
associate-/l*66.8%
Simplified66.8%
Taylor expanded in y around 0 33.5%
mul-1-neg33.5%
associate-/l*60.6%
distribute-lft-neg-in60.6%
Simplified60.6%
if -1.20000000000000002e92 < z < -7.2000000000000003e54Initial program 51.9%
associate-/l*67.5%
Simplified67.5%
Taylor expanded in z around inf 58.5%
associate--l+58.5%
associate-*r/58.5%
associate-*r/58.5%
mul-1-neg58.5%
div-sub58.5%
mul-1-neg58.5%
distribute-lft-out--58.5%
associate-*r/58.5%
mul-1-neg58.5%
unsub-neg58.5%
distribute-rgt-out--66.9%
Simplified66.9%
Taylor expanded in t around 0 43.2%
associate-/l*58.7%
Simplified58.7%
if -3.99999999999999994e-45 < z < 3.4000000000000001e-221Initial program 90.1%
associate-/l*95.2%
Simplified95.2%
Taylor expanded in z around 0 83.6%
Taylor expanded in t around inf 75.6%
associate-/l*77.9%
Simplified77.9%
if 3.4000000000000001e-221 < z < 1.34999999999999997e97Initial program 87.9%
associate-/l*89.4%
Simplified89.4%
Taylor expanded in z around 0 61.9%
Taylor expanded in x around inf 57.1%
mul-1-neg57.1%
unsub-neg57.1%
Simplified57.1%
Final simplification65.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -3.2e-45)
t_1
(if (<= z 3e-218)
(+ x (* t (/ y a)))
(if (<= z 7.5e+31) (* x (- 1.0 (/ 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 <= -3.2e-45) {
tmp = t_1;
} else if (z <= 3e-218) {
tmp = x + (t * (y / a));
} else if (z <= 7.5e+31) {
tmp = x * (1.0 - (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 <= (-3.2d-45)) then
tmp = t_1
else if (z <= 3d-218) then
tmp = x + (t * (y / a))
else if (z <= 7.5d+31) then
tmp = x * (1.0d0 - (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 <= -3.2e-45) {
tmp = t_1;
} else if (z <= 3e-218) {
tmp = x + (t * (y / a));
} else if (z <= 7.5e+31) {
tmp = x * (1.0 - (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 <= -3.2e-45: tmp = t_1 elif z <= 3e-218: tmp = x + (t * (y / a)) elif z <= 7.5e+31: tmp = x * (1.0 - (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 <= -3.2e-45) tmp = t_1; elseif (z <= 3e-218) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 7.5e+31) tmp = Float64(x * Float64(1.0 - 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 <= -3.2e-45) tmp = t_1; elseif (z <= 3e-218) tmp = x + (t * (y / a)); elseif (z <= 7.5e+31) tmp = x * (1.0 - (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, -3.2e-45], t$95$1, If[LessEqual[z, 3e-218], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e+31], N[(x * N[(1.0 - 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 -3.2 \cdot 10^{-45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-218}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{+31}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.20000000000000007e-45 or 7.5e31 < z Initial program 41.5%
associate-/l*67.9%
Simplified67.9%
Taylor expanded in x around 0 36.7%
associate-/l*62.2%
Simplified62.2%
if -3.20000000000000007e-45 < z < 2.9999999999999998e-218Initial program 90.1%
associate-/l*95.2%
Simplified95.2%
Taylor expanded in z around 0 83.6%
Taylor expanded in t around inf 75.6%
associate-/l*77.9%
Simplified77.9%
if 2.9999999999999998e-218 < z < 7.5e31Initial program 85.6%
associate-/l*87.3%
Simplified87.3%
Taylor expanded in z around 0 64.7%
Taylor expanded in x around inf 61.1%
mul-1-neg61.1%
unsub-neg61.1%
Simplified61.1%
Final simplification66.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.7e+158) (not (<= z 1e+205))) (+ t (* (- t x) (/ (- a y) z))) (+ x (* (- y z) (/ (- t x) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.7e+158) || !(z <= 1e+205)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + ((y - z) * ((t - 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 ((z <= (-3.7d+158)) .or. (.not. (z <= 1d+205))) then
tmp = t + ((t - x) * ((a - y) / z))
else
tmp = x + ((y - z) * ((t - 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 ((z <= -3.7e+158) || !(z <= 1e+205)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + ((y - z) * ((t - x) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.7e+158) or not (z <= 1e+205): tmp = t + ((t - x) * ((a - y) / z)) else: tmp = x + ((y - z) * ((t - x) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.7e+158) || !(z <= 1e+205)) tmp = Float64(t + Float64(Float64(t - x) * Float64(Float64(a - y) / z))); else tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.7e+158) || ~((z <= 1e+205))) tmp = t + ((t - x) * ((a - y) / z)); else tmp = x + ((y - z) * ((t - x) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.7e+158], N[Not[LessEqual[z, 1e+205]], $MachinePrecision]], N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{+158} \lor \neg \left(z \leq 10^{+205}\right):\\
\;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\end{array}
\end{array}
if z < -3.70000000000000011e158 or 1.00000000000000002e205 < z Initial program 15.3%
associate-/l*53.8%
Simplified53.8%
add-cube-cbrt53.7%
fma-define53.8%
pow253.8%
*-commutative53.8%
associate-*l/15.4%
associate-*r/56.2%
Applied egg-rr56.2%
fma-undefine56.0%
unpow256.0%
add-cube-cbrt56.0%
*-commutative56.0%
associate-/r/53.7%
add-cube-cbrt53.0%
pow353.0%
+-commutative53.0%
associate-/r/55.2%
*-commutative55.2%
fma-define55.3%
Applied egg-rr55.3%
Taylor expanded in z around inf 70.0%
associate--l+70.0%
associate-*r/70.0%
associate-*r/70.0%
div-sub70.0%
distribute-lft-out--70.0%
distribute-rgt-out--70.0%
associate-*r/70.0%
neg-mul-170.0%
sub-neg70.0%
associate-*r/92.9%
Simplified92.9%
if -3.70000000000000011e158 < z < 1.00000000000000002e205Initial program 81.3%
associate-/l*88.8%
Simplified88.8%
Final simplification89.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.9e+95)
t
(if (<= z 4.9e-233)
x
(if (<= z 3.1e-107) (* t (/ y (- a z))) (if (<= z 1.35e+97) x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.9e+95) {
tmp = t;
} else if (z <= 4.9e-233) {
tmp = x;
} else if (z <= 3.1e-107) {
tmp = t * (y / (a - z));
} else if (z <= 1.35e+97) {
tmp = x;
} 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 <= (-3.9d+95)) then
tmp = t
else if (z <= 4.9d-233) then
tmp = x
else if (z <= 3.1d-107) then
tmp = t * (y / (a - z))
else if (z <= 1.35d+97) then
tmp = x
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 <= -3.9e+95) {
tmp = t;
} else if (z <= 4.9e-233) {
tmp = x;
} else if (z <= 3.1e-107) {
tmp = t * (y / (a - z));
} else if (z <= 1.35e+97) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.9e+95: tmp = t elif z <= 4.9e-233: tmp = x elif z <= 3.1e-107: tmp = t * (y / (a - z)) elif z <= 1.35e+97: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.9e+95) tmp = t; elseif (z <= 4.9e-233) tmp = x; elseif (z <= 3.1e-107) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (z <= 1.35e+97) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.9e+95) tmp = t; elseif (z <= 4.9e-233) tmp = x; elseif (z <= 3.1e-107) tmp = t * (y / (a - z)); elseif (z <= 1.35e+97) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.9e+95], t, If[LessEqual[z, 4.9e-233], x, If[LessEqual[z, 3.1e-107], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+97], x, t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{+95}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{-233}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-107}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+97}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.8999999999999997e95 or 1.34999999999999997e97 < z Initial program 28.6%
associate-/l*61.5%
Simplified61.5%
Taylor expanded in z around inf 59.8%
if -3.8999999999999997e95 < z < 4.9e-233 or 3.10000000000000022e-107 < z < 1.34999999999999997e97Initial program 83.8%
associate-/l*90.1%
Simplified90.1%
Taylor expanded in a around inf 41.4%
if 4.9e-233 < z < 3.10000000000000022e-107Initial program 92.3%
associate-/l*92.2%
Simplified92.2%
Taylor expanded in x around 0 45.9%
associate-/l*49.5%
Simplified49.5%
Taylor expanded in y around inf 42.0%
associate-/l*45.6%
Simplified45.6%
Final simplification48.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.1e+121)
t
(if (<= z 1.3e-221)
(+ x (* t (/ y a)))
(if (<= z 1.1e+101) (* x (- 1.0 (/ y a))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.1e+121) {
tmp = t;
} else if (z <= 1.3e-221) {
tmp = x + (t * (y / a));
} else if (z <= 1.1e+101) {
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.1d+121)) then
tmp = t
else if (z <= 1.3d-221) then
tmp = x + (t * (y / a))
else if (z <= 1.1d+101) 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.1e+121) {
tmp = t;
} else if (z <= 1.3e-221) {
tmp = x + (t * (y / a));
} else if (z <= 1.1e+101) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.1e+121: tmp = t elif z <= 1.3e-221: tmp = x + (t * (y / a)) elif z <= 1.1e+101: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.1e+121) tmp = t; elseif (z <= 1.3e-221) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 1.1e+101) 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.1e+121) tmp = t; elseif (z <= 1.3e-221) tmp = x + (t * (y / a)); elseif (z <= 1.1e+101) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.1e+121], t, If[LessEqual[z, 1.3e-221], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+101], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+121}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-221}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+101}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -4.1e121 or 1.1e101 < z Initial program 27.0%
associate-/l*61.1%
Simplified61.1%
Taylor expanded in z around inf 61.5%
if -4.1e121 < z < 1.3000000000000001e-221Initial program 82.0%
associate-/l*89.7%
Simplified89.7%
Taylor expanded in z around 0 67.4%
Taylor expanded in t around inf 61.2%
associate-/l*63.7%
Simplified63.7%
if 1.3000000000000001e-221 < z < 1.1e101Initial program 87.9%
associate-/l*89.4%
Simplified89.4%
Taylor expanded in z around 0 61.9%
Taylor expanded in x around inf 57.1%
mul-1-neg57.1%
unsub-neg57.1%
Simplified57.1%
Final simplification61.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.9e+95)
t
(if (<= z 2.5e-231)
x
(if (<= z 6.5e-108) (* t (/ y a)) (if (<= z 2.1e+100) x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.9e+95) {
tmp = t;
} else if (z <= 2.5e-231) {
tmp = x;
} else if (z <= 6.5e-108) {
tmp = t * (y / a);
} else if (z <= 2.1e+100) {
tmp = x;
} 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.9d+95)) then
tmp = t
else if (z <= 2.5d-231) then
tmp = x
else if (z <= 6.5d-108) then
tmp = t * (y / a)
else if (z <= 2.1d+100) then
tmp = x
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.9e+95) {
tmp = t;
} else if (z <= 2.5e-231) {
tmp = x;
} else if (z <= 6.5e-108) {
tmp = t * (y / a);
} else if (z <= 2.1e+100) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.9e+95: tmp = t elif z <= 2.5e-231: tmp = x elif z <= 6.5e-108: tmp = t * (y / a) elif z <= 2.1e+100: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.9e+95) tmp = t; elseif (z <= 2.5e-231) tmp = x; elseif (z <= 6.5e-108) tmp = Float64(t * Float64(y / a)); elseif (z <= 2.1e+100) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.9e+95) tmp = t; elseif (z <= 2.5e-231) tmp = x; elseif (z <= 6.5e-108) tmp = t * (y / a); elseif (z <= 2.1e+100) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.9e+95], t, If[LessEqual[z, 2.5e-231], x, If[LessEqual[z, 6.5e-108], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+100], x, t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.9 \cdot 10^{+95}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-231}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-108}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+100}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -4.8999999999999999e95 or 2.0999999999999999e100 < z Initial program 28.6%
associate-/l*61.5%
Simplified61.5%
Taylor expanded in z around inf 59.8%
if -4.8999999999999999e95 < z < 2.50000000000000012e-231 or 6.5000000000000002e-108 < z < 2.0999999999999999e100Initial program 83.8%
associate-/l*90.1%
Simplified90.1%
Taylor expanded in a around inf 41.4%
if 2.50000000000000012e-231 < z < 6.5000000000000002e-108Initial program 92.3%
associate-/l*92.2%
Simplified92.2%
Taylor expanded in z around 0 76.7%
Taylor expanded in y around inf 57.3%
Taylor expanded in t around inf 37.8%
associate-/l*41.4%
Simplified41.4%
Final simplification48.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -7e+95)
t
(if (<= z 2e-231)
x
(if (<= z 7.5e-108) (/ t (/ a y)) (if (<= z 4.8e+96) x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7e+95) {
tmp = t;
} else if (z <= 2e-231) {
tmp = x;
} else if (z <= 7.5e-108) {
tmp = t / (a / y);
} else if (z <= 4.8e+96) {
tmp = x;
} 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 <= (-7d+95)) then
tmp = t
else if (z <= 2d-231) then
tmp = x
else if (z <= 7.5d-108) then
tmp = t / (a / y)
else if (z <= 4.8d+96) then
tmp = x
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 <= -7e+95) {
tmp = t;
} else if (z <= 2e-231) {
tmp = x;
} else if (z <= 7.5e-108) {
tmp = t / (a / y);
} else if (z <= 4.8e+96) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7e+95: tmp = t elif z <= 2e-231: tmp = x elif z <= 7.5e-108: tmp = t / (a / y) elif z <= 4.8e+96: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7e+95) tmp = t; elseif (z <= 2e-231) tmp = x; elseif (z <= 7.5e-108) tmp = Float64(t / Float64(a / y)); elseif (z <= 4.8e+96) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7e+95) tmp = t; elseif (z <= 2e-231) tmp = x; elseif (z <= 7.5e-108) tmp = t / (a / y); elseif (z <= 4.8e+96) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7e+95], t, If[LessEqual[z, 2e-231], x, If[LessEqual[z, 7.5e-108], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.8e+96], x, t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+95}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-231}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-108}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{+96}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -6.99999999999999999e95 or 4.79999999999999986e96 < z Initial program 28.6%
associate-/l*61.5%
Simplified61.5%
Taylor expanded in z around inf 59.8%
if -6.99999999999999999e95 < z < 2e-231 or 7.4999999999999993e-108 < z < 4.79999999999999986e96Initial program 83.8%
associate-/l*90.1%
Simplified90.1%
Taylor expanded in a around inf 41.4%
if 2e-231 < z < 7.4999999999999993e-108Initial program 92.3%
associate-/l*92.2%
Simplified92.2%
Taylor expanded in z around 0 76.7%
Taylor expanded in y around inf 57.3%
Taylor expanded in t around inf 37.8%
associate-/l*41.4%
Simplified41.4%
clear-num41.4%
un-div-inv41.4%
Applied egg-rr41.4%
Final simplification48.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.6e+29) (not (<= z 7e+96))) (- t (/ (* x (- a y)) z)) (+ x (/ (- y z) (/ a (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.6e+29) || !(z <= 7e+96)) {
tmp = t - ((x * (a - y)) / z);
} else {
tmp = x + ((y - z) / (a / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-3.6d+29)) .or. (.not. (z <= 7d+96))) then
tmp = t - ((x * (a - y)) / z)
else
tmp = x + ((y - z) / (a / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.6e+29) || !(z <= 7e+96)) {
tmp = t - ((x * (a - y)) / z);
} else {
tmp = x + ((y - z) / (a / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.6e+29) or not (z <= 7e+96): tmp = t - ((x * (a - y)) / z) else: tmp = x + ((y - z) / (a / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.6e+29) || !(z <= 7e+96)) tmp = Float64(t - Float64(Float64(x * Float64(a - y)) / z)); else tmp = Float64(x + Float64(Float64(y - z) / Float64(a / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.6e+29) || ~((z <= 7e+96))) tmp = t - ((x * (a - y)) / z); else tmp = x + ((y - z) / (a / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.6e+29], N[Not[LessEqual[z, 7e+96]], $MachinePrecision]], N[(t - N[(N[(x * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+29} \lor \neg \left(z \leq 7 \cdot 10^{+96}\right):\\
\;\;\;\;t - \frac{x \cdot \left(a - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\
\end{array}
\end{array}
if z < -3.59999999999999976e29 or 6.9999999999999998e96 < z Initial program 33.3%
associate-/l*63.3%
Simplified63.3%
Taylor expanded in z around inf 63.9%
associate--l+63.9%
associate-*r/63.9%
associate-*r/63.9%
mul-1-neg63.9%
div-sub63.9%
mul-1-neg63.9%
distribute-lft-out--63.9%
associate-*r/63.9%
mul-1-neg63.9%
unsub-neg63.9%
distribute-rgt-out--64.9%
Simplified64.9%
Taylor expanded in t around 0 71.9%
associate-*r/71.9%
associate-*r*71.9%
neg-mul-171.9%
Simplified71.9%
if -3.59999999999999976e29 < z < 6.9999999999999998e96Initial program 88.6%
associate-/l*92.6%
Simplified92.6%
clear-num92.4%
un-div-inv92.4%
Applied egg-rr92.4%
Taylor expanded in a around inf 80.3%
Final simplification76.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.4e+28) (not (<= z 7.8e+98))) (+ t (* (- t x) (/ (- a y) z))) (+ x (/ (- y z) (/ a (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.4e+28) || !(z <= 7.8e+98)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + ((y - z) / (a / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-3.4d+28)) .or. (.not. (z <= 7.8d+98))) then
tmp = t + ((t - x) * ((a - y) / z))
else
tmp = x + ((y - z) / (a / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.4e+28) || !(z <= 7.8e+98)) {
tmp = t + ((t - x) * ((a - y) / z));
} else {
tmp = x + ((y - z) / (a / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.4e+28) or not (z <= 7.8e+98): tmp = t + ((t - x) * ((a - y) / z)) else: tmp = x + ((y - z) / (a / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.4e+28) || !(z <= 7.8e+98)) tmp = Float64(t + Float64(Float64(t - x) * Float64(Float64(a - y) / z))); else tmp = Float64(x + Float64(Float64(y - z) / Float64(a / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.4e+28) || ~((z <= 7.8e+98))) tmp = t + ((t - x) * ((a - y) / z)); else tmp = x + ((y - z) / (a / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.4e+28], N[Not[LessEqual[z, 7.8e+98]], $MachinePrecision]], N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(a - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+28} \lor \neg \left(z \leq 7.8 \cdot 10^{+98}\right):\\
\;\;\;\;t + \left(t - x\right) \cdot \frac{a - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\
\end{array}
\end{array}
if z < -3.4e28 or 7.7999999999999999e98 < z Initial program 33.3%
associate-/l*63.3%
Simplified63.3%
add-cube-cbrt63.2%
fma-define63.4%
pow263.4%
*-commutative63.4%
associate-*l/33.3%
associate-*r/65.6%
Applied egg-rr65.6%
fma-undefine65.4%
unpow265.4%
add-cube-cbrt65.5%
*-commutative65.5%
associate-/r/63.3%
add-cube-cbrt62.3%
pow362.2%
+-commutative62.2%
associate-/r/64.4%
*-commutative64.4%
fma-define64.5%
Applied egg-rr64.5%
Taylor expanded in z around inf 63.9%
associate--l+63.9%
associate-*r/63.9%
associate-*r/63.9%
div-sub63.9%
distribute-lft-out--63.9%
distribute-rgt-out--64.9%
associate-*r/64.9%
neg-mul-164.9%
sub-neg64.9%
associate-*r/83.9%
Simplified83.9%
if -3.4e28 < z < 7.7999999999999999e98Initial program 88.6%
associate-/l*92.6%
Simplified92.6%
clear-num92.4%
un-div-inv92.4%
Applied egg-rr92.4%
Taylor expanded in a around inf 80.3%
Final simplification81.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.7e-45) (not (<= z 6.8e+45))) (* t (/ (- y z) (- a z))) (+ x (* y (/ (- t x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.7e-45) || !(z <= 6.8e+45)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * ((t - 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 ((z <= (-4.7d-45)) .or. (.not. (z <= 6.8d+45))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (y * ((t - 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 ((z <= -4.7e-45) || !(z <= 6.8e+45)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.7e-45) or not (z <= 6.8e+45): tmp = t * ((y - z) / (a - z)) else: tmp = x + (y * ((t - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.7e-45) || !(z <= 6.8e+45)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.7e-45) || ~((z <= 6.8e+45))) tmp = t * ((y - z) / (a - z)); else tmp = x + (y * ((t - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.7e-45], N[Not[LessEqual[z, 6.8e+45]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.7 \cdot 10^{-45} \lor \neg \left(z \leq 6.8 \cdot 10^{+45}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if z < -4.6999999999999998e-45 or 6.8e45 < z Initial program 40.1%
associate-/l*67.1%
Simplified67.1%
Taylor expanded in x around 0 36.7%
associate-/l*62.8%
Simplified62.8%
if -4.6999999999999998e-45 < z < 6.8e45Initial program 88.7%
associate-/l*92.5%
Simplified92.5%
Taylor expanded in z around 0 76.5%
associate-/l*80.3%
Simplified80.3%
Final simplification71.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.5e-45) (not (<= z 1.45e+38))) (- t (* y (/ (- t x) z))) (+ x (* y (/ (- t x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.5e-45) || !(z <= 1.45e+38)) {
tmp = t - (y * ((t - x) / z));
} else {
tmp = x + (y * ((t - 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 ((z <= (-4.5d-45)) .or. (.not. (z <= 1.45d+38))) then
tmp = t - (y * ((t - x) / z))
else
tmp = x + (y * ((t - 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 ((z <= -4.5e-45) || !(z <= 1.45e+38)) {
tmp = t - (y * ((t - x) / z));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.5e-45) or not (z <= 1.45e+38): tmp = t - (y * ((t - x) / z)) else: tmp = x + (y * ((t - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.5e-45) || !(z <= 1.45e+38)) tmp = Float64(t - Float64(y * Float64(Float64(t - x) / z))); else tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.5e-45) || ~((z <= 1.45e+38))) tmp = t - (y * ((t - x) / z)); else tmp = x + (y * ((t - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.5e-45], N[Not[LessEqual[z, 1.45e+38]], $MachinePrecision]], N[(t - N[(y * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{-45} \lor \neg \left(z \leq 1.45 \cdot 10^{+38}\right):\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if z < -4.4999999999999999e-45 or 1.45000000000000003e38 < z Initial program 40.5%
associate-/l*67.4%
Simplified67.4%
Taylor expanded in z around inf 61.8%
associate--l+61.8%
associate-*r/61.8%
associate-*r/61.8%
mul-1-neg61.8%
div-sub61.8%
mul-1-neg61.8%
distribute-lft-out--61.8%
associate-*r/61.8%
mul-1-neg61.8%
unsub-neg61.8%
distribute-rgt-out--62.6%
Simplified62.6%
Taylor expanded in y around inf 59.1%
associate-/l*68.6%
Simplified68.6%
if -4.4999999999999999e-45 < z < 1.45000000000000003e38Initial program 88.6%
associate-/l*92.4%
Simplified92.4%
Taylor expanded in z around 0 77.1%
associate-/l*80.8%
Simplified80.8%
Final simplification74.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.4e+120) t (if (<= z 1e+98) (* x (- 1.0 (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.4e+120) {
tmp = t;
} else if (z <= 1e+98) {
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 <= (-1.4d+120)) then
tmp = t
else if (z <= 1d+98) 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 <= -1.4e+120) {
tmp = t;
} else if (z <= 1e+98) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.4e+120: tmp = t elif z <= 1e+98: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.4e+120) tmp = t; elseif (z <= 1e+98) 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 <= -1.4e+120) tmp = t; elseif (z <= 1e+98) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.4e+120], t, If[LessEqual[z, 1e+98], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+120}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 10^{+98}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.4e120 or 9.99999999999999998e97 < z Initial program 27.0%
associate-/l*61.1%
Simplified61.1%
Taylor expanded in z around inf 61.5%
if -1.4e120 < z < 9.99999999999999998e97Initial program 83.9%
associate-/l*89.6%
Simplified89.6%
Taylor expanded in z around 0 65.6%
Taylor expanded in x around inf 55.3%
mul-1-neg55.3%
unsub-neg55.3%
Simplified55.3%
Final simplification57.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.2e+119) t (if (<= z 2.6e+98) (* x (/ (- a y) a)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+119) {
tmp = t;
} else if (z <= 2.6e+98) {
tmp = x * ((a - 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 <= (-3.2d+119)) then
tmp = t
else if (z <= 2.6d+98) then
tmp = x * ((a - 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 <= -3.2e+119) {
tmp = t;
} else if (z <= 2.6e+98) {
tmp = x * ((a - y) / a);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.2e+119: tmp = t elif z <= 2.6e+98: tmp = x * ((a - y) / a) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.2e+119) tmp = t; elseif (z <= 2.6e+98) tmp = Float64(x * Float64(Float64(a - y) / a)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.2e+119) tmp = t; elseif (z <= 2.6e+98) tmp = x * ((a - y) / a); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2e+119], t, If[LessEqual[z, 2.6e+98], N[(x * N[(N[(a - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+119}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+98}:\\
\;\;\;\;x \cdot \frac{a - y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.19999999999999989e119 or 2.6e98 < z Initial program 27.0%
associate-/l*61.1%
Simplified61.1%
Taylor expanded in z around inf 61.5%
if -3.19999999999999989e119 < z < 2.6e98Initial program 83.9%
associate-/l*89.6%
Simplified89.6%
Taylor expanded in z around 0 65.6%
Taylor expanded in x around inf 55.3%
mul-1-neg55.3%
unsub-neg55.3%
Simplified55.3%
Taylor expanded in a around 0 55.4%
Final simplification57.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.15e+96) t (if (<= z 4.8e+96) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e+96) {
tmp = t;
} else if (z <= 4.8e+96) {
tmp = x;
} 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 <= (-1.15d+96)) then
tmp = t
else if (z <= 4.8d+96) then
tmp = x
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 <= -1.15e+96) {
tmp = t;
} else if (z <= 4.8e+96) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.15e+96: tmp = t elif z <= 4.8e+96: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.15e+96) tmp = t; elseif (z <= 4.8e+96) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.15e+96) tmp = t; elseif (z <= 4.8e+96) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.15e+96], t, If[LessEqual[z, 4.8e+96], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+96}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{+96}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.15000000000000008e96 or 4.79999999999999986e96 < z Initial program 28.6%
associate-/l*61.5%
Simplified61.5%
Taylor expanded in z around inf 59.8%
if -1.15000000000000008e96 < z < 4.79999999999999986e96Initial program 85.1%
associate-/l*90.4%
Simplified90.4%
Taylor expanded in a around inf 38.3%
Final simplification46.1%
(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 64.6%
associate-/l*79.9%
Simplified79.9%
Taylor expanded in z around inf 26.8%
Final simplification26.8%
(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 2024066
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(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))))