
(FPCore (x y z t) :precision binary64 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
def code(x, y, z, t): return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0)
function code(x, y, z, t) return Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) end
function tmp = code(x, y, z, t) tmp = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0); end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
def code(x, y, z, t): return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0)
function code(x, y, z, t) return Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) end
function tmp = code(x, y, z, t) tmp = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0); end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* z t) x)) (t_2 (/ (+ x (/ (- (* y z) x) t_1)) (+ x 1.0))))
(if (<= t_2 -1e+198)
(/ (+ x (* y (+ (/ x (* y (- x (* z t)))) (/ z t_1)))) (+ x 1.0))
(if (<= t_2 1e+264)
(/ (- (+ x (/ (* y z) t_1)) (/ x t_1)) (+ x 1.0))
(- (/ x (+ x 1.0)) (/ (- (/ x (* z (+ x 1.0))) (/ y (+ x 1.0))) t))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_2 <= -1e+198) {
tmp = (x + (y * ((x / (y * (x - (z * t)))) + (z / t_1)))) / (x + 1.0);
} else if (t_2 <= 1e+264) {
tmp = ((x + ((y * z) / t_1)) - (x / t_1)) / (x + 1.0);
} else {
tmp = (x / (x + 1.0)) - (((x / (z * (x + 1.0))) - (y / (x + 1.0))) / t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z * t) - x
t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0d0)
if (t_2 <= (-1d+198)) then
tmp = (x + (y * ((x / (y * (x - (z * t)))) + (z / t_1)))) / (x + 1.0d0)
else if (t_2 <= 1d+264) then
tmp = ((x + ((y * z) / t_1)) - (x / t_1)) / (x + 1.0d0)
else
tmp = (x / (x + 1.0d0)) - (((x / (z * (x + 1.0d0))) - (y / (x + 1.0d0))) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_2 <= -1e+198) {
tmp = (x + (y * ((x / (y * (x - (z * t)))) + (z / t_1)))) / (x + 1.0);
} else if (t_2 <= 1e+264) {
tmp = ((x + ((y * z) / t_1)) - (x / t_1)) / (x + 1.0);
} else {
tmp = (x / (x + 1.0)) - (((x / (z * (x + 1.0))) - (y / (x + 1.0))) / t);
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * t) - x t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0) tmp = 0 if t_2 <= -1e+198: tmp = (x + (y * ((x / (y * (x - (z * t)))) + (z / t_1)))) / (x + 1.0) elif t_2 <= 1e+264: tmp = ((x + ((y * z) / t_1)) - (x / t_1)) / (x + 1.0) else: tmp = (x / (x + 1.0)) - (((x / (z * (x + 1.0))) - (y / (x + 1.0))) / t) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * t) - x) t_2 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / t_1)) / Float64(x + 1.0)) tmp = 0.0 if (t_2 <= -1e+198) tmp = Float64(Float64(x + Float64(y * Float64(Float64(x / Float64(y * Float64(x - Float64(z * t)))) + Float64(z / t_1)))) / Float64(x + 1.0)); elseif (t_2 <= 1e+264) tmp = Float64(Float64(Float64(x + Float64(Float64(y * z) / t_1)) - Float64(x / t_1)) / Float64(x + 1.0)); else tmp = Float64(Float64(x / Float64(x + 1.0)) - Float64(Float64(Float64(x / Float64(z * Float64(x + 1.0))) - Float64(y / Float64(x + 1.0))) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * t) - x; t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0); tmp = 0.0; if (t_2 <= -1e+198) tmp = (x + (y * ((x / (y * (x - (z * t)))) + (z / t_1)))) / (x + 1.0); elseif (t_2 <= 1e+264) tmp = ((x + ((y * z) / t_1)) - (x / t_1)) / (x + 1.0); else tmp = (x / (x + 1.0)) - (((x / (z * (x + 1.0))) - (y / (x + 1.0))) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+198], N[(N[(x + N[(y * N[(N[(x / N[(y * N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+264], N[(N[(N[(x + N[(N[(y * z), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] - N[(x / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x / N[(z * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot t - x\\
t_2 := \frac{x + \frac{y \cdot z - x}{t\_1}}{x + 1}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+198}:\\
\;\;\;\;\frac{x + y \cdot \left(\frac{x}{y \cdot \left(x - z \cdot t\right)} + \frac{z}{t\_1}\right)}{x + 1}\\
\mathbf{elif}\;t\_2 \leq 10^{+264}:\\
\;\;\;\;\frac{\left(x + \frac{y \cdot z}{t\_1}\right) - \frac{x}{t\_1}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1} - \frac{\frac{x}{z \cdot \left(x + 1\right)} - \frac{y}{x + 1}}{t}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1.00000000000000002e198Initial program 70.8%
*-commutative70.8%
Simplified70.8%
Taylor expanded in y around inf 99.9%
if -1.00000000000000002e198 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000004e264Initial program 99.4%
*-commutative99.4%
Simplified99.4%
div-sub99.4%
associate-+r-99.4%
Applied egg-rr99.4%
if 1.00000000000000004e264 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 28.3%
*-commutative28.3%
Simplified28.3%
Taylor expanded in t around -inf 74.3%
+-commutative74.3%
mul-1-neg74.3%
unsub-neg74.3%
+-commutative74.3%
sub-neg74.3%
mul-1-neg74.3%
distribute-neg-frac274.3%
distribute-neg-in74.3%
metadata-eval74.3%
unsub-neg74.3%
mul-1-neg74.3%
remove-double-neg74.3%
+-commutative74.3%
Simplified74.3%
Final simplification97.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* z t) x)) (t_2 (/ (+ x (/ (- (* y z) x) t_1)) (+ x 1.0))))
(if (<= t_2 (- INFINITY))
(/ (+ x (* z (/ y t_1))) (+ x 1.0))
(if (<= t_2 1e+264)
(/ (- (+ x (/ (* y z) t_1)) (/ x t_1)) (+ x 1.0))
(- (/ x (+ x 1.0)) (/ (- (/ x (* z (+ x 1.0))) (/ y (+ x 1.0))) t))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (x + (z * (y / t_1))) / (x + 1.0);
} else if (t_2 <= 1e+264) {
tmp = ((x + ((y * z) / t_1)) - (x / t_1)) / (x + 1.0);
} else {
tmp = (x / (x + 1.0)) - (((x / (z * (x + 1.0))) - (y / (x + 1.0))) / t);
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (x + (z * (y / t_1))) / (x + 1.0);
} else if (t_2 <= 1e+264) {
tmp = ((x + ((y * z) / t_1)) - (x / t_1)) / (x + 1.0);
} else {
tmp = (x / (x + 1.0)) - (((x / (z * (x + 1.0))) - (y / (x + 1.0))) / t);
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * t) - x t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0) tmp = 0 if t_2 <= -math.inf: tmp = (x + (z * (y / t_1))) / (x + 1.0) elif t_2 <= 1e+264: tmp = ((x + ((y * z) / t_1)) - (x / t_1)) / (x + 1.0) else: tmp = (x / (x + 1.0)) - (((x / (z * (x + 1.0))) - (y / (x + 1.0))) / t) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * t) - x) t_2 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / t_1)) / Float64(x + 1.0)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(x + Float64(z * Float64(y / t_1))) / Float64(x + 1.0)); elseif (t_2 <= 1e+264) tmp = Float64(Float64(Float64(x + Float64(Float64(y * z) / t_1)) - Float64(x / t_1)) / Float64(x + 1.0)); else tmp = Float64(Float64(x / Float64(x + 1.0)) - Float64(Float64(Float64(x / Float64(z * Float64(x + 1.0))) - Float64(y / Float64(x + 1.0))) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * t) - x; t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0); tmp = 0.0; if (t_2 <= -Inf) tmp = (x + (z * (y / t_1))) / (x + 1.0); elseif (t_2 <= 1e+264) tmp = ((x + ((y * z) / t_1)) - (x / t_1)) / (x + 1.0); else tmp = (x / (x + 1.0)) - (((x / (z * (x + 1.0))) - (y / (x + 1.0))) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(x + N[(z * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+264], N[(N[(N[(x + N[(N[(y * z), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] - N[(x / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x / N[(z * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot t - x\\
t_2 := \frac{x + \frac{y \cdot z - x}{t\_1}}{x + 1}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t\_1}}{x + 1}\\
\mathbf{elif}\;t\_2 \leq 10^{+264}:\\
\;\;\;\;\frac{\left(x + \frac{y \cdot z}{t\_1}\right) - \frac{x}{t\_1}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1} - \frac{\frac{x}{z \cdot \left(x + 1\right)} - \frac{y}{x + 1}}{t}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -inf.0Initial program 62.0%
*-commutative62.0%
Simplified62.0%
Taylor expanded in y around inf 62.0%
*-commutative62.0%
Simplified62.0%
associate-/l*99.9%
*-commutative99.9%
Applied egg-rr99.9%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000004e264Initial program 99.4%
*-commutative99.4%
Simplified99.4%
div-sub99.4%
associate-+r-99.4%
Applied egg-rr99.4%
if 1.00000000000000004e264 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 28.3%
*-commutative28.3%
Simplified28.3%
Taylor expanded in t around -inf 74.3%
+-commutative74.3%
mul-1-neg74.3%
unsub-neg74.3%
+-commutative74.3%
sub-neg74.3%
mul-1-neg74.3%
distribute-neg-frac274.3%
distribute-neg-in74.3%
metadata-eval74.3%
unsub-neg74.3%
mul-1-neg74.3%
remove-double-neg74.3%
+-commutative74.3%
Simplified74.3%
Final simplification97.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* z t) x)) (t_2 (/ (+ x (/ (- (* y z) x) t_1)) (+ x 1.0))))
(if (<= t_2 (- INFINITY))
(/ (+ x (* z (/ y t_1))) (+ x 1.0))
(if (<= t_2 1e+264)
t_2
(- (/ x (+ x 1.0)) (/ (- (/ x (* z (+ x 1.0))) (/ y (+ x 1.0))) t))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (x + (z * (y / t_1))) / (x + 1.0);
} else if (t_2 <= 1e+264) {
tmp = t_2;
} else {
tmp = (x / (x + 1.0)) - (((x / (z * (x + 1.0))) - (y / (x + 1.0))) / t);
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (x + (z * (y / t_1))) / (x + 1.0);
} else if (t_2 <= 1e+264) {
tmp = t_2;
} else {
tmp = (x / (x + 1.0)) - (((x / (z * (x + 1.0))) - (y / (x + 1.0))) / t);
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * t) - x t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0) tmp = 0 if t_2 <= -math.inf: tmp = (x + (z * (y / t_1))) / (x + 1.0) elif t_2 <= 1e+264: tmp = t_2 else: tmp = (x / (x + 1.0)) - (((x / (z * (x + 1.0))) - (y / (x + 1.0))) / t) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * t) - x) t_2 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / t_1)) / Float64(x + 1.0)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(x + Float64(z * Float64(y / t_1))) / Float64(x + 1.0)); elseif (t_2 <= 1e+264) tmp = t_2; else tmp = Float64(Float64(x / Float64(x + 1.0)) - Float64(Float64(Float64(x / Float64(z * Float64(x + 1.0))) - Float64(y / Float64(x + 1.0))) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * t) - x; t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0); tmp = 0.0; if (t_2 <= -Inf) tmp = (x + (z * (y / t_1))) / (x + 1.0); elseif (t_2 <= 1e+264) tmp = t_2; else tmp = (x / (x + 1.0)) - (((x / (z * (x + 1.0))) - (y / (x + 1.0))) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(x + N[(z * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+264], t$95$2, N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x / N[(z * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot t - x\\
t_2 := \frac{x + \frac{y \cdot z - x}{t\_1}}{x + 1}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t\_1}}{x + 1}\\
\mathbf{elif}\;t\_2 \leq 10^{+264}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + 1} - \frac{\frac{x}{z \cdot \left(x + 1\right)} - \frac{y}{x + 1}}{t}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -inf.0Initial program 62.0%
*-commutative62.0%
Simplified62.0%
Taylor expanded in y around inf 62.0%
*-commutative62.0%
Simplified62.0%
associate-/l*99.9%
*-commutative99.9%
Applied egg-rr99.9%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000004e264Initial program 99.4%
if 1.00000000000000004e264 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 28.3%
*-commutative28.3%
Simplified28.3%
Taylor expanded in t around -inf 74.3%
+-commutative74.3%
mul-1-neg74.3%
unsub-neg74.3%
+-commutative74.3%
sub-neg74.3%
mul-1-neg74.3%
distribute-neg-frac274.3%
distribute-neg-in74.3%
metadata-eval74.3%
unsub-neg74.3%
mul-1-neg74.3%
remove-double-neg74.3%
+-commutative74.3%
Simplified74.3%
Final simplification97.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* z t) x)) (t_2 (/ (+ x (/ (- (* y z) x) t_1)) (+ x 1.0))))
(if (<= t_2 (- INFINITY))
(/ (+ x (* z (/ y t_1))) (+ x 1.0))
(if (<= t_2 1e+264) t_2 (/ (+ x (/ y t)) (+ x 1.0))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (x + (z * (y / t_1))) / (x + 1.0);
} else if (t_2 <= 1e+264) {
tmp = t_2;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (z * t) - x;
double t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (x + (z * (y / t_1))) / (x + 1.0);
} else if (t_2 <= 1e+264) {
tmp = t_2;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * t) - x t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0) tmp = 0 if t_2 <= -math.inf: tmp = (x + (z * (y / t_1))) / (x + 1.0) elif t_2 <= 1e+264: tmp = t_2 else: tmp = (x + (y / t)) / (x + 1.0) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * t) - x) t_2 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / t_1)) / Float64(x + 1.0)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(x + Float64(z * Float64(y / t_1))) / Float64(x + 1.0)); elseif (t_2 <= 1e+264) tmp = t_2; else tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * t) - x; t_2 = (x + (((y * z) - x) / t_1)) / (x + 1.0); tmp = 0.0; if (t_2 <= -Inf) tmp = (x + (z * (y / t_1))) / (x + 1.0); elseif (t_2 <= 1e+264) tmp = t_2; else tmp = (x + (y / t)) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(x + N[(z * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+264], t$95$2, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot t - x\\
t_2 := \frac{x + \frac{y \cdot z - x}{t\_1}}{x + 1}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t\_1}}{x + 1}\\
\mathbf{elif}\;t\_2 \leq 10^{+264}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -inf.0Initial program 62.0%
*-commutative62.0%
Simplified62.0%
Taylor expanded in y around inf 62.0%
*-commutative62.0%
Simplified62.0%
associate-/l*99.9%
*-commutative99.9%
Applied egg-rr99.9%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 1.00000000000000004e264Initial program 99.4%
if 1.00000000000000004e264 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 28.3%
*-commutative28.3%
Simplified28.3%
Taylor expanded in z around inf 74.2%
Final simplification97.6%
(FPCore (x y z t)
:precision binary64
(if (<= x -6.2e-60)
1.0
(if (<= x -2.5e-149)
x
(if (<= x 2.5e-120)
(/ y t)
(if (<= x 4.8e-66) x (if (<= x 5.2e-48) (/ y t) 1.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -6.2e-60) {
tmp = 1.0;
} else if (x <= -2.5e-149) {
tmp = x;
} else if (x <= 2.5e-120) {
tmp = y / t;
} else if (x <= 4.8e-66) {
tmp = x;
} else if (x <= 5.2e-48) {
tmp = y / t;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-6.2d-60)) then
tmp = 1.0d0
else if (x <= (-2.5d-149)) then
tmp = x
else if (x <= 2.5d-120) then
tmp = y / t
else if (x <= 4.8d-66) then
tmp = x
else if (x <= 5.2d-48) then
tmp = y / t
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -6.2e-60) {
tmp = 1.0;
} else if (x <= -2.5e-149) {
tmp = x;
} else if (x <= 2.5e-120) {
tmp = y / t;
} else if (x <= 4.8e-66) {
tmp = x;
} else if (x <= 5.2e-48) {
tmp = y / t;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -6.2e-60: tmp = 1.0 elif x <= -2.5e-149: tmp = x elif x <= 2.5e-120: tmp = y / t elif x <= 4.8e-66: tmp = x elif x <= 5.2e-48: tmp = y / t else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -6.2e-60) tmp = 1.0; elseif (x <= -2.5e-149) tmp = x; elseif (x <= 2.5e-120) tmp = Float64(y / t); elseif (x <= 4.8e-66) tmp = x; elseif (x <= 5.2e-48) tmp = Float64(y / t); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -6.2e-60) tmp = 1.0; elseif (x <= -2.5e-149) tmp = x; elseif (x <= 2.5e-120) tmp = y / t; elseif (x <= 4.8e-66) tmp = x; elseif (x <= 5.2e-48) tmp = y / t; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -6.2e-60], 1.0, If[LessEqual[x, -2.5e-149], x, If[LessEqual[x, 2.5e-120], N[(y / t), $MachinePrecision], If[LessEqual[x, 4.8e-66], x, If[LessEqual[x, 5.2e-48], N[(y / t), $MachinePrecision], 1.0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{-60}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq -2.5 \cdot 10^{-149}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{-120}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-66}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{-48}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -6.19999999999999976e-60 or 5.19999999999999975e-48 < x Initial program 90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in y around inf 97.2%
Taylor expanded in x around inf 85.2%
if -6.19999999999999976e-60 < x < -2.49999999999999984e-149 or 2.50000000000000003e-120 < x < 4.80000000000000052e-66Initial program 96.7%
*-commutative96.7%
Simplified96.7%
Taylor expanded in t around inf 49.0%
+-commutative49.0%
Simplified49.0%
Taylor expanded in x around 0 49.0%
if -2.49999999999999984e-149 < x < 2.50000000000000003e-120 or 4.80000000000000052e-66 < x < 5.19999999999999975e-48Initial program 93.4%
*-commutative93.4%
Simplified93.4%
Taylor expanded in y around inf 85.8%
Taylor expanded in x around 0 58.8%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.4e-131) (not (<= y 3.9e-227))) (/ (+ x (* z (/ y (- (* z t) x)))) (+ x 1.0)) (/ (+ x (/ x (- x (* z t)))) (+ x 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.4e-131) || !(y <= 3.9e-227)) {
tmp = (x + (z * (y / ((z * t) - x)))) / (x + 1.0);
} else {
tmp = (x + (x / (x - (z * t)))) / (x + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-3.4d-131)) .or. (.not. (y <= 3.9d-227))) then
tmp = (x + (z * (y / ((z * t) - x)))) / (x + 1.0d0)
else
tmp = (x + (x / (x - (z * t)))) / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.4e-131) || !(y <= 3.9e-227)) {
tmp = (x + (z * (y / ((z * t) - x)))) / (x + 1.0);
} else {
tmp = (x + (x / (x - (z * t)))) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.4e-131) or not (y <= 3.9e-227): tmp = (x + (z * (y / ((z * t) - x)))) / (x + 1.0) else: tmp = (x + (x / (x - (z * t)))) / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.4e-131) || !(y <= 3.9e-227)) tmp = Float64(Float64(x + Float64(z * Float64(y / Float64(Float64(z * t) - x)))) / Float64(x + 1.0)); else tmp = Float64(Float64(x + Float64(x / Float64(x - Float64(z * t)))) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.4e-131) || ~((y <= 3.9e-227))) tmp = (x + (z * (y / ((z * t) - x)))) / (x + 1.0); else tmp = (x + (x / (x - (z * t)))) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.4e-131], N[Not[LessEqual[y, 3.9e-227]], $MachinePrecision]], N[(N[(x + N[(z * N[(y / N[(N[(z * t), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(x / N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{-131} \lor \neg \left(y \leq 3.9 \cdot 10^{-227}\right):\\
\;\;\;\;\frac{x + z \cdot \frac{y}{z \cdot t - x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{x}{x - z \cdot t}}{x + 1}\\
\end{array}
\end{array}
if y < -3.39999999999999995e-131 or 3.8999999999999999e-227 < y Initial program 90.2%
*-commutative90.2%
Simplified90.2%
Taylor expanded in y around inf 83.5%
*-commutative83.5%
Simplified83.5%
associate-/l*86.1%
*-commutative86.1%
Applied egg-rr86.1%
if -3.39999999999999995e-131 < y < 3.8999999999999999e-227Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around 0 94.6%
+-commutative94.6%
Simplified94.6%
Final simplification87.8%
(FPCore (x y z t)
:precision binary64
(if (<= x -2.2e-149)
(/ x (+ x 1.0))
(if (<= x 3.1e-161)
(/ y t)
(if (<= x 6.5e-69) (* x (+ 1.0 (/ (/ -1.0 t) z))) 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.2e-149) {
tmp = x / (x + 1.0);
} else if (x <= 3.1e-161) {
tmp = y / t;
} else if (x <= 6.5e-69) {
tmp = x * (1.0 + ((-1.0 / t) / z));
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-2.2d-149)) then
tmp = x / (x + 1.0d0)
else if (x <= 3.1d-161) then
tmp = y / t
else if (x <= 6.5d-69) then
tmp = x * (1.0d0 + (((-1.0d0) / t) / z))
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.2e-149) {
tmp = x / (x + 1.0);
} else if (x <= 3.1e-161) {
tmp = y / t;
} else if (x <= 6.5e-69) {
tmp = x * (1.0 + ((-1.0 / t) / z));
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -2.2e-149: tmp = x / (x + 1.0) elif x <= 3.1e-161: tmp = y / t elif x <= 6.5e-69: tmp = x * (1.0 + ((-1.0 / t) / z)) else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -2.2e-149) tmp = Float64(x / Float64(x + 1.0)); elseif (x <= 3.1e-161) tmp = Float64(y / t); elseif (x <= 6.5e-69) tmp = Float64(x * Float64(1.0 + Float64(Float64(-1.0 / t) / z))); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -2.2e-149) tmp = x / (x + 1.0); elseif (x <= 3.1e-161) tmp = y / t; elseif (x <= 6.5e-69) tmp = x * (1.0 + ((-1.0 / t) / z)); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -2.2e-149], N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.1e-161], N[(y / t), $MachinePrecision], If[LessEqual[x, 6.5e-69], N[(x * N[(1.0 + N[(N[(-1.0 / t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.0]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{-149}:\\
\;\;\;\;\frac{x}{x + 1}\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{-161}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-69}:\\
\;\;\;\;x \cdot \left(1 + \frac{\frac{-1}{t}}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -2.1999999999999998e-149Initial program 91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in t around inf 78.5%
+-commutative78.5%
Simplified78.5%
if -2.1999999999999998e-149 < x < 3.0999999999999999e-161Initial program 92.5%
*-commutative92.5%
Simplified92.5%
Taylor expanded in y around inf 85.4%
Taylor expanded in x around 0 60.3%
if 3.0999999999999999e-161 < x < 6.49999999999999951e-69Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around -inf 81.9%
mul-1-neg81.9%
unsub-neg81.9%
cancel-sign-sub-inv81.9%
metadata-eval81.9%
*-lft-identity81.9%
+-commutative81.9%
mul-1-neg81.9%
unsub-neg81.9%
Simplified81.9%
Taylor expanded in y around 0 59.6%
associate-/l/59.7%
+-commutative59.7%
Simplified59.7%
Taylor expanded in x around 0 59.7%
associate-/r*59.8%
Simplified59.8%
if 6.49999999999999951e-69 < x Initial program 91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in y around inf 96.3%
Taylor expanded in x around inf 79.8%
Final simplification72.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (+ x 1.0))))
(if (<= x -2.5e-149)
t_1
(if (<= x 1.25e-120)
(/ y t)
(if (<= x 1.45e-62) t_1 (if (<= x 9.5e-48) (/ y t) 1.0))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (x + 1.0);
double tmp;
if (x <= -2.5e-149) {
tmp = t_1;
} else if (x <= 1.25e-120) {
tmp = y / t;
} else if (x <= 1.45e-62) {
tmp = t_1;
} else if (x <= 9.5e-48) {
tmp = y / t;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x / (x + 1.0d0)
if (x <= (-2.5d-149)) then
tmp = t_1
else if (x <= 1.25d-120) then
tmp = y / t
else if (x <= 1.45d-62) then
tmp = t_1
else if (x <= 9.5d-48) then
tmp = y / t
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (x + 1.0);
double tmp;
if (x <= -2.5e-149) {
tmp = t_1;
} else if (x <= 1.25e-120) {
tmp = y / t;
} else if (x <= 1.45e-62) {
tmp = t_1;
} else if (x <= 9.5e-48) {
tmp = y / t;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (x + 1.0) tmp = 0 if x <= -2.5e-149: tmp = t_1 elif x <= 1.25e-120: tmp = y / t elif x <= 1.45e-62: tmp = t_1 elif x <= 9.5e-48: tmp = y / t else: tmp = 1.0 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(x + 1.0)) tmp = 0.0 if (x <= -2.5e-149) tmp = t_1; elseif (x <= 1.25e-120) tmp = Float64(y / t); elseif (x <= 1.45e-62) tmp = t_1; elseif (x <= 9.5e-48) tmp = Float64(y / t); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (x + 1.0); tmp = 0.0; if (x <= -2.5e-149) tmp = t_1; elseif (x <= 1.25e-120) tmp = y / t; elseif (x <= 1.45e-62) tmp = t_1; elseif (x <= 9.5e-48) tmp = y / t; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.5e-149], t$95$1, If[LessEqual[x, 1.25e-120], N[(y / t), $MachinePrecision], If[LessEqual[x, 1.45e-62], t$95$1, If[LessEqual[x, 9.5e-48], N[(y / t), $MachinePrecision], 1.0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{x + 1}\\
\mathbf{if}\;x \leq -2.5 \cdot 10^{-149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{-120}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{-62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{-48}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -2.49999999999999984e-149 or 1.25000000000000002e-120 < x < 1.44999999999999993e-62Initial program 92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in t around inf 74.5%
+-commutative74.5%
Simplified74.5%
if -2.49999999999999984e-149 < x < 1.25000000000000002e-120 or 1.44999999999999993e-62 < x < 9.50000000000000036e-48Initial program 93.4%
*-commutative93.4%
Simplified93.4%
Taylor expanded in y around inf 85.8%
Taylor expanded in x around 0 58.8%
if 9.50000000000000036e-48 < x Initial program 90.9%
*-commutative90.9%
Simplified90.9%
Taylor expanded in y around inf 96.2%
Taylor expanded in x around inf 83.7%
(FPCore (x y z t) :precision binary64 (if (or (<= x -7.5e-149) (not (<= x 4.3e-48))) (/ (+ x (/ x (- x (* z t)))) (+ x 1.0)) (/ (+ x (/ (- y (/ x z)) t)) (+ x 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -7.5e-149) || !(x <= 4.3e-48)) {
tmp = (x + (x / (x - (z * t)))) / (x + 1.0);
} else {
tmp = (x + ((y - (x / z)) / t)) / (x + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-7.5d-149)) .or. (.not. (x <= 4.3d-48))) then
tmp = (x + (x / (x - (z * t)))) / (x + 1.0d0)
else
tmp = (x + ((y - (x / z)) / t)) / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -7.5e-149) || !(x <= 4.3e-48)) {
tmp = (x + (x / (x - (z * t)))) / (x + 1.0);
} else {
tmp = (x + ((y - (x / z)) / t)) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -7.5e-149) or not (x <= 4.3e-48): tmp = (x + (x / (x - (z * t)))) / (x + 1.0) else: tmp = (x + ((y - (x / z)) / t)) / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -7.5e-149) || !(x <= 4.3e-48)) tmp = Float64(Float64(x + Float64(x / Float64(x - Float64(z * t)))) / Float64(x + 1.0)); else tmp = Float64(Float64(x + Float64(Float64(y - Float64(x / z)) / t)) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -7.5e-149) || ~((x <= 4.3e-48))) tmp = (x + (x / (x - (z * t)))) / (x + 1.0); else tmp = (x + ((y - (x / z)) / t)) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -7.5e-149], N[Not[LessEqual[x, 4.3e-48]], $MachinePrecision]], N[(N[(x + N[(x / N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{-149} \lor \neg \left(x \leq 4.3 \cdot 10^{-48}\right):\\
\;\;\;\;\frac{x + \frac{x}{x - z \cdot t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y - \frac{x}{z}}{t}}{x + 1}\\
\end{array}
\end{array}
if x < -7.49999999999999995e-149 or 4.3e-48 < x Initial program 91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in y around 0 88.3%
+-commutative88.3%
Simplified88.3%
if -7.49999999999999995e-149 < x < 4.3e-48Initial program 94.4%
*-commutative94.4%
Simplified94.4%
Taylor expanded in t around -inf 76.4%
mul-1-neg76.4%
unsub-neg76.4%
cancel-sign-sub-inv76.4%
metadata-eval76.4%
*-lft-identity76.4%
+-commutative76.4%
mul-1-neg76.4%
unsub-neg76.4%
Simplified76.4%
Final simplification84.0%
(FPCore (x y z t) :precision binary64 (if (or (<= x -7.6e-149) (not (<= x 7.8e-48))) (/ (+ x (/ x (- x (* z t)))) (+ x 1.0)) (/ (+ x (/ y t)) (+ x 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -7.6e-149) || !(x <= 7.8e-48)) {
tmp = (x + (x / (x - (z * t)))) / (x + 1.0);
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-7.6d-149)) .or. (.not. (x <= 7.8d-48))) then
tmp = (x + (x / (x - (z * t)))) / (x + 1.0d0)
else
tmp = (x + (y / t)) / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -7.6e-149) || !(x <= 7.8e-48)) {
tmp = (x + (x / (x - (z * t)))) / (x + 1.0);
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -7.6e-149) or not (x <= 7.8e-48): tmp = (x + (x / (x - (z * t)))) / (x + 1.0) else: tmp = (x + (y / t)) / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -7.6e-149) || !(x <= 7.8e-48)) tmp = Float64(Float64(x + Float64(x / Float64(x - Float64(z * t)))) / Float64(x + 1.0)); else tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -7.6e-149) || ~((x <= 7.8e-48))) tmp = (x + (x / (x - (z * t)))) / (x + 1.0); else tmp = (x + (y / t)) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -7.6e-149], N[Not[LessEqual[x, 7.8e-48]], $MachinePrecision]], N[(N[(x + N[(x / N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.6 \cdot 10^{-149} \lor \neg \left(x \leq 7.8 \cdot 10^{-48}\right):\\
\;\;\;\;\frac{x + \frac{x}{x - z \cdot t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}
\end{array}
if x < -7.6000000000000001e-149 or 7.800000000000001e-48 < x Initial program 91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in y around 0 88.3%
+-commutative88.3%
Simplified88.3%
if -7.6000000000000001e-149 < x < 7.800000000000001e-48Initial program 94.4%
*-commutative94.4%
Simplified94.4%
Taylor expanded in z around inf 70.9%
Final simplification82.0%
(FPCore (x y z t)
:precision binary64
(if (<= x -7.6e-149)
(/ (+ x (/ x (- x (* z t)))) (+ x 1.0))
(if (<= x 5.1e-48)
(/ (+ x (/ (- y (/ x z)) t)) (+ x 1.0))
(/ (- (+ x 1.0) (* y (/ z x))) (+ x 1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -7.6e-149) {
tmp = (x + (x / (x - (z * t)))) / (x + 1.0);
} else if (x <= 5.1e-48) {
tmp = (x + ((y - (x / z)) / t)) / (x + 1.0);
} else {
tmp = ((x + 1.0) - (y * (z / x))) / (x + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-7.6d-149)) then
tmp = (x + (x / (x - (z * t)))) / (x + 1.0d0)
else if (x <= 5.1d-48) then
tmp = (x + ((y - (x / z)) / t)) / (x + 1.0d0)
else
tmp = ((x + 1.0d0) - (y * (z / x))) / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -7.6e-149) {
tmp = (x + (x / (x - (z * t)))) / (x + 1.0);
} else if (x <= 5.1e-48) {
tmp = (x + ((y - (x / z)) / t)) / (x + 1.0);
} else {
tmp = ((x + 1.0) - (y * (z / x))) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -7.6e-149: tmp = (x + (x / (x - (z * t)))) / (x + 1.0) elif x <= 5.1e-48: tmp = (x + ((y - (x / z)) / t)) / (x + 1.0) else: tmp = ((x + 1.0) - (y * (z / x))) / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -7.6e-149) tmp = Float64(Float64(x + Float64(x / Float64(x - Float64(z * t)))) / Float64(x + 1.0)); elseif (x <= 5.1e-48) tmp = Float64(Float64(x + Float64(Float64(y - Float64(x / z)) / t)) / Float64(x + 1.0)); else tmp = Float64(Float64(Float64(x + 1.0) - Float64(y * Float64(z / x))) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -7.6e-149) tmp = (x + (x / (x - (z * t)))) / (x + 1.0); elseif (x <= 5.1e-48) tmp = (x + ((y - (x / z)) / t)) / (x + 1.0); else tmp = ((x + 1.0) - (y * (z / x))) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -7.6e-149], N[(N[(x + N[(x / N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.1e-48], N[(N[(x + N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x + 1.0), $MachinePrecision] - N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.6 \cdot 10^{-149}:\\
\;\;\;\;\frac{x + \frac{x}{x - z \cdot t}}{x + 1}\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-48}:\\
\;\;\;\;\frac{x + \frac{y - \frac{x}{z}}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x + 1\right) - y \cdot \frac{z}{x}}{x + 1}\\
\end{array}
\end{array}
if x < -7.6000000000000001e-149Initial program 91.1%
*-commutative91.1%
Simplified91.1%
Taylor expanded in y around 0 89.1%
+-commutative89.1%
Simplified89.1%
if -7.6000000000000001e-149 < x < 5.10000000000000011e-48Initial program 94.4%
*-commutative94.4%
Simplified94.4%
Taylor expanded in t around -inf 76.4%
mul-1-neg76.4%
unsub-neg76.4%
cancel-sign-sub-inv76.4%
metadata-eval76.4%
*-lft-identity76.4%
+-commutative76.4%
mul-1-neg76.4%
unsub-neg76.4%
Simplified76.4%
if 5.10000000000000011e-48 < x Initial program 90.9%
*-commutative90.9%
Simplified90.9%
Taylor expanded in t around 0 85.0%
associate-+r+85.0%
mul-1-neg85.0%
unsub-neg85.0%
+-commutative85.0%
associate-/l*88.9%
+-commutative88.9%
Simplified88.9%
Final simplification84.5%
(FPCore (x y z t)
:precision binary64
(if (<= x -1.18e-53)
1.0
(if (<= x 1.1e-29)
(+ (/ x (+ x 1.0)) (/ y (* t (+ x 1.0))))
(/ (- x (* y (/ z x))) (+ x 1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.18e-53) {
tmp = 1.0;
} else if (x <= 1.1e-29) {
tmp = (x / (x + 1.0)) + (y / (t * (x + 1.0)));
} else {
tmp = (x - (y * (z / x))) / (x + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-1.18d-53)) then
tmp = 1.0d0
else if (x <= 1.1d-29) then
tmp = (x / (x + 1.0d0)) + (y / (t * (x + 1.0d0)))
else
tmp = (x - (y * (z / x))) / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.18e-53) {
tmp = 1.0;
} else if (x <= 1.1e-29) {
tmp = (x / (x + 1.0)) + (y / (t * (x + 1.0)));
} else {
tmp = (x - (y * (z / x))) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.18e-53: tmp = 1.0 elif x <= 1.1e-29: tmp = (x / (x + 1.0)) + (y / (t * (x + 1.0))) else: tmp = (x - (y * (z / x))) / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.18e-53) tmp = 1.0; elseif (x <= 1.1e-29) tmp = Float64(Float64(x / Float64(x + 1.0)) + Float64(y / Float64(t * Float64(x + 1.0)))); else tmp = Float64(Float64(x - Float64(y * Float64(z / x))) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.18e-53) tmp = 1.0; elseif (x <= 1.1e-29) tmp = (x / (x + 1.0)) + (y / (t * (x + 1.0))); else tmp = (x - (y * (z / x))) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.18e-53], 1.0, If[LessEqual[x, 1.1e-29], N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.18 \cdot 10^{-53}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{-29}:\\
\;\;\;\;\frac{x}{x + 1} + \frac{y}{t \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y \cdot \frac{z}{x}}{x + 1}\\
\end{array}
\end{array}
if x < -1.18000000000000005e-53Initial program 90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in y around inf 98.3%
Taylor expanded in x around inf 86.8%
if -1.18000000000000005e-53 < x < 1.09999999999999995e-29Initial program 94.5%
*-commutative94.5%
Simplified94.5%
Taylor expanded in y around inf 76.4%
*-commutative76.4%
Simplified76.4%
Taylor expanded in t around inf 66.3%
+-commutative66.3%
+-commutative66.3%
Simplified66.3%
if 1.09999999999999995e-29 < x Initial program 90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in y around inf 85.3%
*-commutative85.3%
Simplified85.3%
Taylor expanded in t around 0 84.2%
mul-1-neg84.2%
unsub-neg84.2%
associate-/l*88.3%
+-commutative88.3%
Simplified88.3%
(FPCore (x y z t)
:precision binary64
(if (<= x -1.05e-53)
1.0
(if (<= x 1.85e-28)
(/ (+ x (/ y t)) (+ x 1.0))
(/ (- x (* y (/ z x))) (+ x 1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.05e-53) {
tmp = 1.0;
} else if (x <= 1.85e-28) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = (x - (y * (z / x))) / (x + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-1.05d-53)) then
tmp = 1.0d0
else if (x <= 1.85d-28) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = (x - (y * (z / x))) / (x + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.05e-53) {
tmp = 1.0;
} else if (x <= 1.85e-28) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = (x - (y * (z / x))) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.05e-53: tmp = 1.0 elif x <= 1.85e-28: tmp = (x + (y / t)) / (x + 1.0) else: tmp = (x - (y * (z / x))) / (x + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.05e-53) tmp = 1.0; elseif (x <= 1.85e-28) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = Float64(Float64(x - Float64(y * Float64(z / x))) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.05e-53) tmp = 1.0; elseif (x <= 1.85e-28) tmp = (x + (y / t)) / (x + 1.0); else tmp = (x - (y * (z / x))) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.05e-53], 1.0, If[LessEqual[x, 1.85e-28], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.05 \cdot 10^{-53}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{-28}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y \cdot \frac{z}{x}}{x + 1}\\
\end{array}
\end{array}
if x < -1.04999999999999989e-53Initial program 90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in y around inf 98.3%
Taylor expanded in x around inf 86.8%
if -1.04999999999999989e-53 < x < 1.8500000000000001e-28Initial program 94.5%
*-commutative94.5%
Simplified94.5%
Taylor expanded in z around inf 66.3%
if 1.8500000000000001e-28 < x Initial program 90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in y around inf 85.3%
*-commutative85.3%
Simplified85.3%
Taylor expanded in t around 0 84.2%
mul-1-neg84.2%
unsub-neg84.2%
associate-/l*88.3%
+-commutative88.3%
Simplified88.3%
(FPCore (x y z t) :precision binary64 (if (<= x -1.05e-53) 1.0 (if (<= x 1.02e-47) (/ (+ x (/ y t)) (+ x 1.0)) 1.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.05e-53) {
tmp = 1.0;
} else if (x <= 1.02e-47) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-1.05d-53)) then
tmp = 1.0d0
else if (x <= 1.02d-47) then
tmp = (x + (y / t)) / (x + 1.0d0)
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.05e-53) {
tmp = 1.0;
} else if (x <= 1.02e-47) {
tmp = (x + (y / t)) / (x + 1.0);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.05e-53: tmp = 1.0 elif x <= 1.02e-47: tmp = (x + (y / t)) / (x + 1.0) else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.05e-53) tmp = 1.0; elseif (x <= 1.02e-47) tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.05e-53) tmp = 1.0; elseif (x <= 1.02e-47) tmp = (x + (y / t)) / (x + 1.0); else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.05e-53], 1.0, If[LessEqual[x, 1.02e-47], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.05 \cdot 10^{-53}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 1.02 \cdot 10^{-47}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -1.04999999999999989e-53 or 1.02000000000000002e-47 < x Initial program 90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in y around inf 97.2%
Taylor expanded in x around inf 85.2%
if -1.04999999999999989e-53 < x < 1.02000000000000002e-47Initial program 94.3%
*-commutative94.3%
Simplified94.3%
Taylor expanded in z around inf 67.8%
(FPCore (x y z t) :precision binary64 (if (<= x -8.2e-59) 1.0 (if (<= x 4.8e-68) x 1.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -8.2e-59) {
tmp = 1.0;
} else if (x <= 4.8e-68) {
tmp = x;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-8.2d-59)) then
tmp = 1.0d0
else if (x <= 4.8d-68) then
tmp = x
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -8.2e-59) {
tmp = 1.0;
} else if (x <= 4.8e-68) {
tmp = x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -8.2e-59: tmp = 1.0 elif x <= 4.8e-68: tmp = x else: tmp = 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -8.2e-59) tmp = 1.0; elseif (x <= 4.8e-68) tmp = x; else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -8.2e-59) tmp = 1.0; elseif (x <= 4.8e-68) tmp = x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -8.2e-59], 1.0, If[LessEqual[x, 4.8e-68], x, 1.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.2 \cdot 10^{-59}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-68}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < -8.1999999999999991e-59 or 4.79999999999999982e-68 < x Initial program 90.9%
*-commutative90.9%
Simplified90.9%
Taylor expanded in y around inf 97.2%
Taylor expanded in x around inf 83.1%
if -8.1999999999999991e-59 < x < 4.79999999999999982e-68Initial program 94.1%
*-commutative94.1%
Simplified94.1%
Taylor expanded in t around inf 26.1%
+-commutative26.1%
Simplified26.1%
Taylor expanded in x around 0 26.1%
(FPCore (x y z t) :precision binary64 1.0)
double code(double x, double y, double z, double t) {
return 1.0;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = 1.0d0
end function
public static double code(double x, double y, double z, double t) {
return 1.0;
}
def code(x, y, z, t): return 1.0
function code(x, y, z, t) return 1.0 end
function tmp = code(x, y, z, t) tmp = 1.0; end
code[x_, y_, z_, t_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 92.2%
*-commutative92.2%
Simplified92.2%
Taylor expanded in y around inf 93.0%
Taylor expanded in x around inf 53.6%
(FPCore (x y z t) :precision binary64 (/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0);
}
def code(x, y, z, t): return (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0)
function code(x, y, z, t) return Float64(Float64(x + Float64(Float64(y / Float64(t - Float64(x / z))) - Float64(x / Float64(Float64(t * z) - x)))) / Float64(x + 1.0)) end
function tmp = code(x, y, z, t) tmp = (x + ((y / (t - (x / z))) - (x / ((t * z) - x)))) / (x + 1.0); end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(y / N[(t - N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \left(\frac{y}{t - \frac{x}{z}} - \frac{x}{t \cdot z - x}\right)}{x + 1}
\end{array}
herbie shell --seed 2024081
(FPCore (x y z t)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, A"
:precision binary64
:alt
(/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0))
(/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))