
(FPCore (x y z t a b)
:precision binary64
(+
x
(/
(*
y
(+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b))
(+
(* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z)
0.607771387771))))
double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = x + ((y * ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
def code(x, y, z, t, a, b): return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))
function code(x, y, z, t, a, b) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) end
function tmp = code(x, y, z, t, a, b) tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b)
:precision binary64
(+
x
(/
(*
y
(+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b))
(+
(* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z)
0.607771387771))))
double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = x + ((y * ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
def code(x, y, z, t, a, b): return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))
function code(x, y, z, t, a, b) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) end
function tmp = code(x, y, z, t, a, b) tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2.9e+45)
(fma
y
(+ 3.13060547623 (/ (- (/ (+ t 457.9610022158428) z) 36.52704169880642) z))
x)
(if (<= z 2600000.0)
(fma
y
(/
(fma z (fma z (fma z (fma z 3.13060547623 11.1667541262) t) a) b)
(fma
z
(fma z (fma z (+ z 15.234687407) 31.4690115749) 11.9400905721)
0.607771387771))
x)
(+
x
(-
(* y 3.13060547623)
(*
y
(/
(-
36.52704169880642
(/
(+
457.9610022158428
(+
t
(/
(+
a
(+ 1112.0901850848957 (+ -6976.8927133548 (* t -15.234687407))))
z)))
z))
z)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.9e+45) {
tmp = fma(y, (3.13060547623 + ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)), x);
} else if (z <= 2600000.0) {
tmp = fma(y, (fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b) / fma(z, fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), x);
} else {
tmp = x + ((y * 3.13060547623) - (y * ((36.52704169880642 - ((457.9610022158428 + (t + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z))) / z)) / z)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.9e+45) tmp = fma(y, Float64(3.13060547623 + Float64(Float64(Float64(Float64(t + 457.9610022158428) / z) - 36.52704169880642) / z)), x); elseif (z <= 2600000.0) tmp = fma(y, Float64(fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b) / fma(z, fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), x); else tmp = Float64(x + Float64(Float64(y * 3.13060547623) - Float64(y * Float64(Float64(36.52704169880642 - Float64(Float64(457.9610022158428 + Float64(t + Float64(Float64(a + Float64(1112.0901850848957 + Float64(-6976.8927133548 + Float64(t * -15.234687407)))) / z))) / z)) / z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.9e+45], N[(y * N[(3.13060547623 + N[(N[(N[(N[(t + 457.9610022158428), $MachinePrecision] / z), $MachinePrecision] - 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 2600000.0], N[(y * N[(N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision] / N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] - N[(y * N[(N[(36.52704169880642 - N[(N[(457.9610022158428 + N[(t + N[(N[(a + N[(1112.0901850848957 + N[(-6976.8927133548 + N[(t * -15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+45}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623 + \frac{\frac{t + 457.9610022158428}{z} - 36.52704169880642}{z}, x\right)\\
\mathbf{elif}\;z \leq 2600000:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), t\right), a\right), b\right)}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot 3.13060547623 - y \cdot \frac{36.52704169880642 - \frac{457.9610022158428 + \left(t + \frac{a + \left(1112.0901850848957 + \left(-6976.8927133548 + t \cdot -15.234687407\right)\right)}{z}\right)}{z}}{z}\right)\\
\end{array}
\end{array}
if z < -2.8999999999999997e45Initial program 6.2%
Simplified7.8%
Taylor expanded in z around -inf 100.0%
mul-1-neg100.0%
unsub-neg100.0%
mul-1-neg100.0%
unsub-neg100.0%
+-commutative100.0%
Simplified100.0%
if -2.8999999999999997e45 < z < 2.6e6Initial program 99.7%
Simplified99.7%
if 2.6e6 < z Initial program 15.0%
Taylor expanded in z around -inf 77.2%
Taylor expanded in y around 0 94.0%
Simplified100.0%
Final simplification99.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -48000000000000.0)
(fma
y
(-
3.13060547623
(/
(-
36.52704169880642
(/
(+
457.9610022158428
(+ t (/ (+ a (+ (* t -15.234687407) -5864.8025282699045)) z)))
z))
z))
x)
(if (<= z 2600000.0)
(+
x
(/
(*
y
(+
b
(* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))))
(+
0.607771387771
(*
z
(+ 11.9400905721 (* z (+ 31.4690115749 (* z (+ z 15.234687407)))))))))
(+
x
(-
(* y 3.13060547623)
(*
y
(/
(-
36.52704169880642
(/
(+
457.9610022158428
(+
t
(/
(+
a
(+ 1112.0901850848957 (+ -6976.8927133548 (* t -15.234687407))))
z)))
z))
z)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -48000000000000.0) {
tmp = fma(y, (3.13060547623 - ((36.52704169880642 - ((457.9610022158428 + (t + ((a + ((t * -15.234687407) + -5864.8025282699045)) / z))) / z)) / z)), x);
} else if (z <= 2600000.0) {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))));
} else {
tmp = x + ((y * 3.13060547623) - (y * ((36.52704169880642 - ((457.9610022158428 + (t + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z))) / z)) / z)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -48000000000000.0) tmp = fma(y, Float64(3.13060547623 - Float64(Float64(36.52704169880642 - Float64(Float64(457.9610022158428 + Float64(t + Float64(Float64(a + Float64(Float64(t * -15.234687407) + -5864.8025282699045)) / z))) / z)) / z)), x); elseif (z <= 2600000.0) tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))))) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))))); else tmp = Float64(x + Float64(Float64(y * 3.13060547623) - Float64(y * Float64(Float64(36.52704169880642 - Float64(Float64(457.9610022158428 + Float64(t + Float64(Float64(a + Float64(1112.0901850848957 + Float64(-6976.8927133548 + Float64(t * -15.234687407)))) / z))) / z)) / z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -48000000000000.0], N[(y * N[(3.13060547623 - N[(N[(36.52704169880642 - N[(N[(457.9610022158428 + N[(t + N[(N[(a + N[(N[(t * -15.234687407), $MachinePrecision] + -5864.8025282699045), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 2600000.0], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] - N[(y * N[(N[(36.52704169880642 - N[(N[(457.9610022158428 + N[(t + N[(N[(a + N[(1112.0901850848957 + N[(-6976.8927133548 + N[(t * -15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -48000000000000:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623 - \frac{36.52704169880642 - \frac{457.9610022158428 + \left(t + \frac{a + \left(t \cdot -15.234687407 + -5864.8025282699045\right)}{z}\right)}{z}}{z}, x\right)\\
\mathbf{elif}\;z \leq 2600000:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot 3.13060547623 - y \cdot \frac{36.52704169880642 - \frac{457.9610022158428 + \left(t + \frac{a + \left(1112.0901850848957 + \left(-6976.8927133548 + t \cdot -15.234687407\right)\right)}{z}\right)}{z}}{z}\right)\\
\end{array}
\end{array}
if z < -4.8e13Initial program 17.3%
Simplified18.8%
Taylor expanded in z around -inf 100.0%
Simplified100.0%
if -4.8e13 < z < 2.6e6Initial program 99.7%
if 2.6e6 < z Initial program 15.0%
Taylor expanded in z around -inf 77.2%
Taylor expanded in y around 0 94.0%
Simplified100.0%
Final simplification99.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
x
(-
(* y 3.13060547623)
(*
y
(/
(-
36.52704169880642
(/
(+
457.9610022158428
(+
t
(/
(+
a
(+
1112.0901850848957
(+ -6976.8927133548 (* t -15.234687407))))
z)))
z))
z))))))
(if (<= z -0.74)
t_1
(if (<= z -2e-251)
(+
x
(+
(* 1.6453555072203998 (* y b))
(*
z
(- (* 1.6453555072203998 (* y a)) (* (* y b) 32.324150453290734)))))
(if (<= z 2.5e-113)
(+ x (* y (* b 1.6453555072203998)))
(if (<= z 16.0)
(+
x
(/
(*
y
(*
z
(+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623))))))))
(+
0.607771387771
(*
z
(+ 11.9400905721 (* z (+ 31.4690115749 (* z 15.234687407))))))))
t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * 3.13060547623) - (y * ((36.52704169880642 - ((457.9610022158428 + (t + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z))) / z)) / z)));
double tmp;
if (z <= -0.74) {
tmp = t_1;
} else if (z <= -2e-251) {
tmp = x + ((1.6453555072203998 * (y * b)) + (z * ((1.6453555072203998 * (y * a)) - ((y * b) * 32.324150453290734))));
} else if (z <= 2.5e-113) {
tmp = x + (y * (b * 1.6453555072203998));
} else if (z <= 16.0) {
tmp = x + ((y * (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623)))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * 15.234687407)))))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y * 3.13060547623d0) - (y * ((36.52704169880642d0 - ((457.9610022158428d0 + (t + ((a + (1112.0901850848957d0 + ((-6976.8927133548d0) + (t * (-15.234687407d0))))) / z))) / z)) / z)))
if (z <= (-0.74d0)) then
tmp = t_1
else if (z <= (-2d-251)) then
tmp = x + ((1.6453555072203998d0 * (y * b)) + (z * ((1.6453555072203998d0 * (y * a)) - ((y * b) * 32.324150453290734d0))))
else if (z <= 2.5d-113) then
tmp = x + (y * (b * 1.6453555072203998d0))
else if (z <= 16.0d0) then
tmp = x + ((y * (z * (a + (z * (t + (z * (11.1667541262d0 + (z * 3.13060547623d0)))))))) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * 15.234687407d0)))))))
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 b) {
double t_1 = x + ((y * 3.13060547623) - (y * ((36.52704169880642 - ((457.9610022158428 + (t + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z))) / z)) / z)));
double tmp;
if (z <= -0.74) {
tmp = t_1;
} else if (z <= -2e-251) {
tmp = x + ((1.6453555072203998 * (y * b)) + (z * ((1.6453555072203998 * (y * a)) - ((y * b) * 32.324150453290734))));
} else if (z <= 2.5e-113) {
tmp = x + (y * (b * 1.6453555072203998));
} else if (z <= 16.0) {
tmp = x + ((y * (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623)))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * 15.234687407)))))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * 3.13060547623) - (y * ((36.52704169880642 - ((457.9610022158428 + (t + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z))) / z)) / z))) tmp = 0 if z <= -0.74: tmp = t_1 elif z <= -2e-251: tmp = x + ((1.6453555072203998 * (y * b)) + (z * ((1.6453555072203998 * (y * a)) - ((y * b) * 32.324150453290734)))) elif z <= 2.5e-113: tmp = x + (y * (b * 1.6453555072203998)) elif z <= 16.0: tmp = x + ((y * (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623)))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * 15.234687407))))))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * 3.13060547623) - Float64(y * Float64(Float64(36.52704169880642 - Float64(Float64(457.9610022158428 + Float64(t + Float64(Float64(a + Float64(1112.0901850848957 + Float64(-6976.8927133548 + Float64(t * -15.234687407)))) / z))) / z)) / z)))) tmp = 0.0 if (z <= -0.74) tmp = t_1; elseif (z <= -2e-251) tmp = Float64(x + Float64(Float64(1.6453555072203998 * Float64(y * b)) + Float64(z * Float64(Float64(1.6453555072203998 * Float64(y * a)) - Float64(Float64(y * b) * 32.324150453290734))))); elseif (z <= 2.5e-113) tmp = Float64(x + Float64(y * Float64(b * 1.6453555072203998))); elseif (z <= 16.0) tmp = Float64(x + Float64(Float64(y * Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623)))))))) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * 15.234687407)))))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * 3.13060547623) - (y * ((36.52704169880642 - ((457.9610022158428 + (t + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z))) / z)) / z))); tmp = 0.0; if (z <= -0.74) tmp = t_1; elseif (z <= -2e-251) tmp = x + ((1.6453555072203998 * (y * b)) + (z * ((1.6453555072203998 * (y * a)) - ((y * b) * 32.324150453290734)))); elseif (z <= 2.5e-113) tmp = x + (y * (b * 1.6453555072203998)); elseif (z <= 16.0) tmp = x + ((y * (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623)))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * 15.234687407))))))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] - N[(y * N[(N[(36.52704169880642 - N[(N[(457.9610022158428 + N[(t + N[(N[(a + N[(1112.0901850848957 + N[(-6976.8927133548 + N[(t * -15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.74], t$95$1, If[LessEqual[z, -2e-251], N[(x + N[(N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(1.6453555072203998 * N[(y * a), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] * 32.324150453290734), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e-113], N[(x + N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 16.0], N[(x + N[(N[(y * N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y \cdot 3.13060547623 - y \cdot \frac{36.52704169880642 - \frac{457.9610022158428 + \left(t + \frac{a + \left(1112.0901850848957 + \left(-6976.8927133548 + t \cdot -15.234687407\right)\right)}{z}\right)}{z}}{z}\right)\\
\mathbf{if}\;z \leq -0.74:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-251}:\\
\;\;\;\;x + \left(1.6453555072203998 \cdot \left(y \cdot b\right) + z \cdot \left(1.6453555072203998 \cdot \left(y \cdot a\right) - \left(y \cdot b\right) \cdot 32.324150453290734\right)\right)\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-113}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\
\mathbf{elif}\;z \leq 16:\\
\;\;\;\;x + \frac{y \cdot \left(z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot 15.234687407\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -0.73999999999999999 or 16 < z Initial program 16.1%
Taylor expanded in z around -inf 80.2%
Taylor expanded in y around 0 96.2%
Simplified100.0%
if -0.73999999999999999 < z < -2.00000000000000003e-251Initial program 99.5%
Taylor expanded in z around 0 88.4%
if -2.00000000000000003e-251 < z < 2.4999999999999999e-113Initial program 99.8%
Taylor expanded in z around 0 92.3%
*-commutative92.3%
*-commutative92.3%
associate-*l*92.3%
Simplified92.3%
if 2.4999999999999999e-113 < z < 16Initial program 99.9%
Taylor expanded in z around 0 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in b around 0 85.7%
Final simplification94.5%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -2.8e+14) (not (<= z 2600000.0)))
(+
x
(-
(* y 3.13060547623)
(*
y
(/
(-
36.52704169880642
(/
(+
457.9610022158428
(+
t
(/
(+
a
(+ 1112.0901850848957 (+ -6976.8927133548 (* t -15.234687407))))
z)))
z))
z))))
(+
x
(/
(*
y
(+
b
(* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))))
(+
0.607771387771
(*
z
(+ 11.9400905721 (* z (+ 31.4690115749 (* z (+ z 15.234687407)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.8e+14) || !(z <= 2600000.0)) {
tmp = x + ((y * 3.13060547623) - (y * ((36.52704169880642 - ((457.9610022158428 + (t + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z))) / z)) / z)));
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((z <= (-2.8d+14)) .or. (.not. (z <= 2600000.0d0))) then
tmp = x + ((y * 3.13060547623d0) - (y * ((36.52704169880642d0 - ((457.9610022158428d0 + (t + ((a + (1112.0901850848957d0 + ((-6976.8927133548d0) + (t * (-15.234687407d0))))) / z))) / z)) / z)))
else
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262d0 + (z * 3.13060547623d0))))))))) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * (z + 15.234687407d0))))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.8e+14) || !(z <= 2600000.0)) {
tmp = x + ((y * 3.13060547623) - (y * ((36.52704169880642 - ((457.9610022158428 + (t + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z))) / z)) / z)));
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.8e+14) or not (z <= 2600000.0): tmp = x + ((y * 3.13060547623) - (y * ((36.52704169880642 - ((457.9610022158428 + (t + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z))) / z)) / z))) else: tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.8e+14) || !(z <= 2600000.0)) tmp = Float64(x + Float64(Float64(y * 3.13060547623) - Float64(y * Float64(Float64(36.52704169880642 - Float64(Float64(457.9610022158428 + Float64(t + Float64(Float64(a + Float64(1112.0901850848957 + Float64(-6976.8927133548 + Float64(t * -15.234687407)))) / z))) / z)) / z)))); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))))) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.8e+14) || ~((z <= 2600000.0))) tmp = x + ((y * 3.13060547623) - (y * ((36.52704169880642 - ((457.9610022158428 + (t + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z))) / z)) / z))); else tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.8e+14], N[Not[LessEqual[z, 2600000.0]], $MachinePrecision]], N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] - N[(y * N[(N[(36.52704169880642 - N[(N[(457.9610022158428 + N[(t + N[(N[(a + N[(1112.0901850848957 + N[(-6976.8927133548 + N[(t * -15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+14} \lor \neg \left(z \leq 2600000\right):\\
\;\;\;\;x + \left(y \cdot 3.13060547623 - y \cdot \frac{36.52704169880642 - \frac{457.9610022158428 + \left(t + \frac{a + \left(1112.0901850848957 + \left(-6976.8927133548 + t \cdot -15.234687407\right)\right)}{z}\right)}{z}}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\
\end{array}
\end{array}
if z < -2.8e14 or 2.6e6 < z Initial program 16.1%
Taylor expanded in z around -inf 80.2%
Taylor expanded in y around 0 96.2%
Simplified100.0%
if -2.8e14 < z < 2.6e6Initial program 99.7%
Final simplification99.8%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -12.8) (not (<= z 116000.0)))
(+
x
(-
(* y 3.13060547623)
(*
y
(/
(-
36.52704169880642
(/
(+
457.9610022158428
(+
t
(/
(+
a
(+ 1112.0901850848957 (+ -6976.8927133548 (* t -15.234687407))))
z)))
z))
z))))
(+
x
(/
(*
y
(+
b
(* z (+ a (* z (+ t (* z (+ 11.1667541262 (* z 3.13060547623)))))))))
(+
0.607771387771
(* z (+ 11.9400905721 (* z (+ 31.4690115749 (* z 15.234687407))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -12.8) || !(z <= 116000.0)) {
tmp = x + ((y * 3.13060547623) - (y * ((36.52704169880642 - ((457.9610022158428 + (t + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z))) / z)) / z)));
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * 15.234687407)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((z <= (-12.8d0)) .or. (.not. (z <= 116000.0d0))) then
tmp = x + ((y * 3.13060547623d0) - (y * ((36.52704169880642d0 - ((457.9610022158428d0 + (t + ((a + (1112.0901850848957d0 + ((-6976.8927133548d0) + (t * (-15.234687407d0))))) / z))) / z)) / z)))
else
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262d0 + (z * 3.13060547623d0))))))))) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * 15.234687407d0)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -12.8) || !(z <= 116000.0)) {
tmp = x + ((y * 3.13060547623) - (y * ((36.52704169880642 - ((457.9610022158428 + (t + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z))) / z)) / z)));
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * 15.234687407)))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -12.8) or not (z <= 116000.0): tmp = x + ((y * 3.13060547623) - (y * ((36.52704169880642 - ((457.9610022158428 + (t + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z))) / z)) / z))) else: tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * 15.234687407))))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -12.8) || !(z <= 116000.0)) tmp = Float64(x + Float64(Float64(y * 3.13060547623) - Float64(y * Float64(Float64(36.52704169880642 - Float64(Float64(457.9610022158428 + Float64(t + Float64(Float64(a + Float64(1112.0901850848957 + Float64(-6976.8927133548 + Float64(t * -15.234687407)))) / z))) / z)) / z)))); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * Float64(11.1667541262 + Float64(z * 3.13060547623))))))))) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * 15.234687407)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -12.8) || ~((z <= 116000.0))) tmp = x + ((y * 3.13060547623) - (y * ((36.52704169880642 - ((457.9610022158428 + (t + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z))) / z)) / z))); else tmp = x + ((y * (b + (z * (a + (z * (t + (z * (11.1667541262 + (z * 3.13060547623))))))))) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * 15.234687407))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -12.8], N[Not[LessEqual[z, 116000.0]], $MachinePrecision]], N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] - N[(y * N[(N[(36.52704169880642 - N[(N[(457.9610022158428 + N[(t + N[(N[(a + N[(1112.0901850848957 + N[(-6976.8927133548 + N[(t * -15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * N[(11.1667541262 + N[(z * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -12.8 \lor \neg \left(z \leq 116000\right):\\
\;\;\;\;x + \left(y \cdot 3.13060547623 - y \cdot \frac{36.52704169880642 - \frac{457.9610022158428 + \left(t + \frac{a + \left(1112.0901850848957 + \left(-6976.8927133548 + t \cdot -15.234687407\right)\right)}{z}\right)}{z}}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot \left(11.1667541262 + z \cdot 3.13060547623\right)\right)\right)\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot 15.234687407\right)\right)}\\
\end{array}
\end{array}
if z < -12.800000000000001 or 116000 < z Initial program 16.1%
Taylor expanded in z around -inf 80.2%
Taylor expanded in y around 0 96.2%
Simplified100.0%
if -12.800000000000001 < z < 116000Initial program 99.7%
Taylor expanded in z around 0 99.7%
*-commutative99.7%
Simplified99.7%
Final simplification99.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
x
(-
(* y 3.13060547623)
(*
y
(/
(-
36.52704169880642
(/
(+
457.9610022158428
(+
t
(/
(+
a
(+
1112.0901850848957
(+ -6976.8927133548 (* t -15.234687407))))
z)))
z))
z))))))
(if (<= z -0.00375)
t_1
(if (<= z -2e-246)
(+
x
(+
(* 1.6453555072203998 (* y b))
(*
z
(- (* 1.6453555072203998 (* y a)) (* (* y b) 32.324150453290734)))))
(if (<= z 12.2) (+ x (* y (* b 1.6453555072203998))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * 3.13060547623) - (y * ((36.52704169880642 - ((457.9610022158428 + (t + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z))) / z)) / z)));
double tmp;
if (z <= -0.00375) {
tmp = t_1;
} else if (z <= -2e-246) {
tmp = x + ((1.6453555072203998 * (y * b)) + (z * ((1.6453555072203998 * (y * a)) - ((y * b) * 32.324150453290734))));
} else if (z <= 12.2) {
tmp = x + (y * (b * 1.6453555072203998));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y * 3.13060547623d0) - (y * ((36.52704169880642d0 - ((457.9610022158428d0 + (t + ((a + (1112.0901850848957d0 + ((-6976.8927133548d0) + (t * (-15.234687407d0))))) / z))) / z)) / z)))
if (z <= (-0.00375d0)) then
tmp = t_1
else if (z <= (-2d-246)) then
tmp = x + ((1.6453555072203998d0 * (y * b)) + (z * ((1.6453555072203998d0 * (y * a)) - ((y * b) * 32.324150453290734d0))))
else if (z <= 12.2d0) then
tmp = x + (y * (b * 1.6453555072203998d0))
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 b) {
double t_1 = x + ((y * 3.13060547623) - (y * ((36.52704169880642 - ((457.9610022158428 + (t + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z))) / z)) / z)));
double tmp;
if (z <= -0.00375) {
tmp = t_1;
} else if (z <= -2e-246) {
tmp = x + ((1.6453555072203998 * (y * b)) + (z * ((1.6453555072203998 * (y * a)) - ((y * b) * 32.324150453290734))));
} else if (z <= 12.2) {
tmp = x + (y * (b * 1.6453555072203998));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * 3.13060547623) - (y * ((36.52704169880642 - ((457.9610022158428 + (t + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z))) / z)) / z))) tmp = 0 if z <= -0.00375: tmp = t_1 elif z <= -2e-246: tmp = x + ((1.6453555072203998 * (y * b)) + (z * ((1.6453555072203998 * (y * a)) - ((y * b) * 32.324150453290734)))) elif z <= 12.2: tmp = x + (y * (b * 1.6453555072203998)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * 3.13060547623) - Float64(y * Float64(Float64(36.52704169880642 - Float64(Float64(457.9610022158428 + Float64(t + Float64(Float64(a + Float64(1112.0901850848957 + Float64(-6976.8927133548 + Float64(t * -15.234687407)))) / z))) / z)) / z)))) tmp = 0.0 if (z <= -0.00375) tmp = t_1; elseif (z <= -2e-246) tmp = Float64(x + Float64(Float64(1.6453555072203998 * Float64(y * b)) + Float64(z * Float64(Float64(1.6453555072203998 * Float64(y * a)) - Float64(Float64(y * b) * 32.324150453290734))))); elseif (z <= 12.2) tmp = Float64(x + Float64(y * Float64(b * 1.6453555072203998))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * 3.13060547623) - (y * ((36.52704169880642 - ((457.9610022158428 + (t + ((a + (1112.0901850848957 + (-6976.8927133548 + (t * -15.234687407)))) / z))) / z)) / z))); tmp = 0.0; if (z <= -0.00375) tmp = t_1; elseif (z <= -2e-246) tmp = x + ((1.6453555072203998 * (y * b)) + (z * ((1.6453555072203998 * (y * a)) - ((y * b) * 32.324150453290734)))); elseif (z <= 12.2) tmp = x + (y * (b * 1.6453555072203998)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * 3.13060547623), $MachinePrecision] - N[(y * N[(N[(36.52704169880642 - N[(N[(457.9610022158428 + N[(t + N[(N[(a + N[(1112.0901850848957 + N[(-6976.8927133548 + N[(t * -15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.00375], t$95$1, If[LessEqual[z, -2e-246], N[(x + N[(N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(1.6453555072203998 * N[(y * a), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] * 32.324150453290734), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 12.2], N[(x + N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y \cdot 3.13060547623 - y \cdot \frac{36.52704169880642 - \frac{457.9610022158428 + \left(t + \frac{a + \left(1112.0901850848957 + \left(-6976.8927133548 + t \cdot -15.234687407\right)\right)}{z}\right)}{z}}{z}\right)\\
\mathbf{if}\;z \leq -0.00375:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-246}:\\
\;\;\;\;x + \left(1.6453555072203998 \cdot \left(y \cdot b\right) + z \cdot \left(1.6453555072203998 \cdot \left(y \cdot a\right) - \left(y \cdot b\right) \cdot 32.324150453290734\right)\right)\\
\mathbf{elif}\;z \leq 12.2:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -0.0037499999999999999 or 12.199999999999999 < z Initial program 16.1%
Taylor expanded in z around -inf 80.2%
Taylor expanded in y around 0 96.2%
Simplified100.0%
if -0.0037499999999999999 < z < -1.99999999999999991e-246Initial program 99.5%
Taylor expanded in z around 0 88.4%
if -1.99999999999999991e-246 < z < 12.199999999999999Initial program 99.8%
Taylor expanded in z around 0 82.6%
*-commutative82.6%
*-commutative82.6%
associate-*l*82.6%
Simplified82.6%
Final simplification92.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
x
(+
(* y (/ (- (/ (+ t 457.9610022158428) z) 36.52704169880642) z))
(* y 3.13060547623)))))
(if (<= z -2.95e+50)
t_1
(if (<= z -1.2e-238)
(+
x
(+
(* 1.6453555072203998 (* y b))
(*
z
(- (* 1.6453555072203998 (* y a)) (* (* y b) 32.324150453290734)))))
(if (<= z 5.5e-59) (+ x (* y (* b 1.6453555072203998))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623));
double tmp;
if (z <= -2.95e+50) {
tmp = t_1;
} else if (z <= -1.2e-238) {
tmp = x + ((1.6453555072203998 * (y * b)) + (z * ((1.6453555072203998 * (y * a)) - ((y * b) * 32.324150453290734))));
} else if (z <= 5.5e-59) {
tmp = x + (y * (b * 1.6453555072203998));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y * ((((t + 457.9610022158428d0) / z) - 36.52704169880642d0) / z)) + (y * 3.13060547623d0))
if (z <= (-2.95d+50)) then
tmp = t_1
else if (z <= (-1.2d-238)) then
tmp = x + ((1.6453555072203998d0 * (y * b)) + (z * ((1.6453555072203998d0 * (y * a)) - ((y * b) * 32.324150453290734d0))))
else if (z <= 5.5d-59) then
tmp = x + (y * (b * 1.6453555072203998d0))
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 b) {
double t_1 = x + ((y * ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623));
double tmp;
if (z <= -2.95e+50) {
tmp = t_1;
} else if (z <= -1.2e-238) {
tmp = x + ((1.6453555072203998 * (y * b)) + (z * ((1.6453555072203998 * (y * a)) - ((y * b) * 32.324150453290734))));
} else if (z <= 5.5e-59) {
tmp = x + (y * (b * 1.6453555072203998));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623)) tmp = 0 if z <= -2.95e+50: tmp = t_1 elif z <= -1.2e-238: tmp = x + ((1.6453555072203998 * (y * b)) + (z * ((1.6453555072203998 * (y * a)) - ((y * b) * 32.324150453290734)))) elif z <= 5.5e-59: tmp = x + (y * (b * 1.6453555072203998)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(t + 457.9610022158428) / z) - 36.52704169880642) / z)) + Float64(y * 3.13060547623))) tmp = 0.0 if (z <= -2.95e+50) tmp = t_1; elseif (z <= -1.2e-238) tmp = Float64(x + Float64(Float64(1.6453555072203998 * Float64(y * b)) + Float64(z * Float64(Float64(1.6453555072203998 * Float64(y * a)) - Float64(Float64(y * b) * 32.324150453290734))))); elseif (z <= 5.5e-59) tmp = Float64(x + Float64(y * Float64(b * 1.6453555072203998))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623)); tmp = 0.0; if (z <= -2.95e+50) tmp = t_1; elseif (z <= -1.2e-238) tmp = x + ((1.6453555072203998 * (y * b)) + (z * ((1.6453555072203998 * (y * a)) - ((y * b) * 32.324150453290734)))); elseif (z <= 5.5e-59) tmp = x + (y * (b * 1.6453555072203998)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * N[(N[(N[(N[(t + 457.9610022158428), $MachinePrecision] / z), $MachinePrecision] - 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.95e+50], t$95$1, If[LessEqual[z, -1.2e-238], N[(x + N[(N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(1.6453555072203998 * N[(y * a), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] * 32.324150453290734), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e-59], N[(x + N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y \cdot \frac{\frac{t + 457.9610022158428}{z} - 36.52704169880642}{z} + y \cdot 3.13060547623\right)\\
\mathbf{if}\;z \leq -2.95 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-238}:\\
\;\;\;\;x + \left(1.6453555072203998 \cdot \left(y \cdot b\right) + z \cdot \left(1.6453555072203998 \cdot \left(y \cdot a\right) - \left(y \cdot b\right) \cdot 32.324150453290734\right)\right)\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-59}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.9499999999999999e50 or 5.50000000000000014e-59 < z Initial program 19.0%
Taylor expanded in z around -inf 80.0%
Taylor expanded in y around 0 88.9%
associate-/l*92.6%
mul-1-neg92.6%
unsub-neg92.6%
+-commutative92.6%
Simplified92.6%
if -2.9499999999999999e50 < z < -1.1999999999999999e-238Initial program 98.0%
Taylor expanded in z around 0 87.2%
if -1.1999999999999999e-238 < z < 5.50000000000000014e-59Initial program 99.8%
Taylor expanded in z around 0 89.0%
*-commutative89.0%
*-commutative89.0%
associate-*l*89.0%
Simplified89.0%
Final simplification90.3%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -4.2e-8) (not (<= z 5.5e-59)))
(+
x
(+
(* y (/ (- (/ (+ t 457.9610022158428) z) 36.52704169880642) z))
(* y 3.13060547623)))
(+ x (* y (* b 1.6453555072203998)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.2e-8) || !(z <= 5.5e-59)) {
tmp = x + ((y * ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623));
} else {
tmp = x + (y * (b * 1.6453555072203998));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((z <= (-4.2d-8)) .or. (.not. (z <= 5.5d-59))) then
tmp = x + ((y * ((((t + 457.9610022158428d0) / z) - 36.52704169880642d0) / z)) + (y * 3.13060547623d0))
else
tmp = x + (y * (b * 1.6453555072203998d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.2e-8) || !(z <= 5.5e-59)) {
tmp = x + ((y * ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623));
} else {
tmp = x + (y * (b * 1.6453555072203998));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.2e-8) or not (z <= 5.5e-59): tmp = x + ((y * ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623)) else: tmp = x + (y * (b * 1.6453555072203998)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.2e-8) || !(z <= 5.5e-59)) tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(t + 457.9610022158428) / z) - 36.52704169880642) / z)) + Float64(y * 3.13060547623))); else tmp = Float64(x + Float64(y * Float64(b * 1.6453555072203998))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.2e-8) || ~((z <= 5.5e-59))) tmp = x + ((y * ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)) + (y * 3.13060547623)); else tmp = x + (y * (b * 1.6453555072203998)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.2e-8], N[Not[LessEqual[z, 5.5e-59]], $MachinePrecision]], N[(x + N[(N[(y * N[(N[(N[(N[(t + 457.9610022158428), $MachinePrecision] / z), $MachinePrecision] - 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-8} \lor \neg \left(z \leq 5.5 \cdot 10^{-59}\right):\\
\;\;\;\;x + \left(y \cdot \frac{\frac{t + 457.9610022158428}{z} - 36.52704169880642}{z} + y \cdot 3.13060547623\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\
\end{array}
\end{array}
if z < -4.19999999999999989e-8 or 5.50000000000000014e-59 < z Initial program 24.9%
Taylor expanded in z around -inf 78.8%
Taylor expanded in y around 0 87.0%
associate-/l*90.3%
mul-1-neg90.3%
unsub-neg90.3%
+-commutative90.3%
Simplified90.3%
if -4.19999999999999989e-8 < z < 5.50000000000000014e-59Initial program 99.7%
Taylor expanded in z around 0 84.3%
*-commutative84.3%
*-commutative84.3%
associate-*l*84.3%
Simplified84.3%
Final simplification87.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.1e-6) (not (<= z 5.2e-13))) (+ x (* y 3.13060547623)) (+ x (* y (* b 1.6453555072203998)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.1e-6) || !(z <= 5.2e-13)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (y * (b * 1.6453555072203998));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((z <= (-5.1d-6)) .or. (.not. (z <= 5.2d-13))) then
tmp = x + (y * 3.13060547623d0)
else
tmp = x + (y * (b * 1.6453555072203998d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.1e-6) || !(z <= 5.2e-13)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (y * (b * 1.6453555072203998));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.1e-6) or not (z <= 5.2e-13): tmp = x + (y * 3.13060547623) else: tmp = x + (y * (b * 1.6453555072203998)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.1e-6) || !(z <= 5.2e-13)) tmp = Float64(x + Float64(y * 3.13060547623)); else tmp = Float64(x + Float64(y * Float64(b * 1.6453555072203998))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.1e-6) || ~((z <= 5.2e-13))) tmp = x + (y * 3.13060547623); else tmp = x + (y * (b * 1.6453555072203998)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.1e-6], N[Not[LessEqual[z, 5.2e-13]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(b * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.1 \cdot 10^{-6} \lor \neg \left(z \leq 5.2 \cdot 10^{-13}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998\right)\\
\end{array}
\end{array}
if z < -5.1000000000000003e-6 or 5.2000000000000001e-13 < z Initial program 20.1%
Simplified22.3%
Taylor expanded in z around inf 88.0%
+-commutative88.0%
*-commutative88.0%
Simplified88.0%
if -5.1000000000000003e-6 < z < 5.2000000000000001e-13Initial program 99.7%
Taylor expanded in z around 0 81.8%
*-commutative81.8%
*-commutative81.8%
associate-*l*81.8%
Simplified81.8%
Final simplification84.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -0.057) (not (<= z 1.1e-57))) (+ x (* y 3.13060547623)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -0.057) || !(z <= 1.1e-57)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((z <= (-0.057d0)) .or. (.not. (z <= 1.1d-57))) then
tmp = x + (y * 3.13060547623d0)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -0.057) || !(z <= 1.1e-57)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -0.057) or not (z <= 1.1e-57): tmp = x + (y * 3.13060547623) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -0.057) || !(z <= 1.1e-57)) tmp = Float64(x + Float64(y * 3.13060547623)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -0.057) || ~((z <= 1.1e-57))) tmp = x + (y * 3.13060547623); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -0.057], N[Not[LessEqual[z, 1.1e-57]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.057 \lor \neg \left(z \leq 1.1 \cdot 10^{-57}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -0.0570000000000000021 or 1.09999999999999999e-57 < z Initial program 23.2%
Simplified25.3%
Taylor expanded in z around inf 86.3%
+-commutative86.3%
*-commutative86.3%
Simplified86.3%
if -0.0570000000000000021 < z < 1.09999999999999999e-57Initial program 99.6%
Simplified99.7%
Taylor expanded in y around 0 46.0%
Final simplification66.6%
(FPCore (x y z t a b) :precision binary64 (if (<= x -6.2e-122) x (if (<= x 2.65e-98) (* y 3.13060547623) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -6.2e-122) {
tmp = x;
} else if (x <= 2.65e-98) {
tmp = y * 3.13060547623;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if (x <= (-6.2d-122)) then
tmp = x
else if (x <= 2.65d-98) then
tmp = y * 3.13060547623d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -6.2e-122) {
tmp = x;
} else if (x <= 2.65e-98) {
tmp = y * 3.13060547623;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -6.2e-122: tmp = x elif x <= 2.65e-98: tmp = y * 3.13060547623 else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -6.2e-122) tmp = x; elseif (x <= 2.65e-98) tmp = Float64(y * 3.13060547623); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -6.2e-122) tmp = x; elseif (x <= 2.65e-98) tmp = y * 3.13060547623; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -6.2e-122], x, If[LessEqual[x, 2.65e-98], N[(y * 3.13060547623), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{-122}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.65 \cdot 10^{-98}:\\
\;\;\;\;y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -6.1999999999999997e-122 or 2.65000000000000015e-98 < x Initial program 59.3%
Simplified60.3%
Taylor expanded in y around 0 62.5%
if -6.1999999999999997e-122 < x < 2.65000000000000015e-98Initial program 63.6%
Simplified64.7%
Taylor expanded in z around inf 37.4%
Taylor expanded in x around 0 32.5%
Taylor expanded in z around inf 33.5%
*-commutative33.5%
Simplified33.5%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 60.5%
Simplified61.6%
Taylor expanded in y around 0 47.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
x
(*
(+ (- 3.13060547623 (/ 36.527041698806414 z)) (/ t (* z z)))
(/ y 1.0)))))
(if (< z -6.499344996252632e+53)
t_1
(if (< z 7.066965436914287e+59)
(+
x
(/
y
(/
(+
(*
(+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771)
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0));
double tmp;
if (z < -6.499344996252632e+53) {
tmp = t_1;
} else if (z < 7.066965436914287e+59) {
tmp = x + (y / ((((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (((3.13060547623d0 - (36.527041698806414d0 / z)) + (t / (z * z))) * (y / 1.0d0))
if (z < (-6.499344996252632d+53)) then
tmp = t_1
else if (z < 7.066965436914287d+59) then
tmp = x + (y / ((((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0) / ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)))
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 b) {
double t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0));
double tmp;
if (z < -6.499344996252632e+53) {
tmp = t_1;
} else if (z < 7.066965436914287e+59) {
tmp = x + (y / ((((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0)) tmp = 0 if z < -6.499344996252632e+53: tmp = t_1 elif z < 7.066965436914287e+59: tmp = x + (y / ((((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(Float64(3.13060547623 - Float64(36.527041698806414 / z)) + Float64(t / Float64(z * z))) * Float64(y / 1.0))) tmp = 0.0 if (z < -6.499344996252632e+53) tmp = t_1; elseif (z < 7.066965436914287e+59) tmp = Float64(x + Float64(y / Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0)); tmp = 0.0; if (z < -6.499344996252632e+53) tmp = t_1; elseif (z < 7.066965436914287e+59) tmp = x + (y / ((((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(N[(3.13060547623 - N[(36.527041698806414 / z), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -6.499344996252632e+53], t$95$1, If[Less[z, 7.066965436914287e+59], N[(x + N[(y / N[(N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\left(3.13060547623 - \frac{36.527041698806414}{z}\right) + \frac{t}{z \cdot z}\right) \cdot \frac{y}{1}\\
\mathbf{if}\;z < -6.499344996252632 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 7.066965436914287 \cdot 10^{+59}:\\
\;\;\;\;x + \frac{y}{\frac{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}{\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024111
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, D"
:precision binary64
:alt
(if (< z -6.499344996252632e+53) (+ x (* (+ (- 3.13060547623 (/ 36.527041698806414 z)) (/ t (* z z))) (/ y 1.0))) (if (< z 7.066965436914287e+59) (+ x (/ y (/ (+ (* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z) 0.607771387771) (+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b)))) (+ x (* (+ (- 3.13060547623 (/ 36.527041698806414 z)) (/ t (* z z))) (/ y 1.0)))))
(+ x (/ (* y (+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b)) (+ (* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z) 0.607771387771))))