
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ (/ y (/ (- a t) (- z t))) x))
double code(double x, double y, double z, double t, double a) {
return (y / ((a - t) / (z - t))) + x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (y / ((a - t) / (z - t))) + x
end function
public static double code(double x, double y, double z, double t, double a) {
return (y / ((a - t) / (z - t))) + x;
}
def code(x, y, z, t, a): return (y / ((a - t) / (z - t))) + x
function code(x, y, z, t, a) return Float64(Float64(y / Float64(Float64(a - t) / Float64(z - t))) + x) end
function tmp = code(x, y, z, t, a) tmp = (y / ((a - t) / (z - t))) + x; end
code[x_, y_, z_, t_, a_] := N[(N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\frac{y}{\frac{a - t}{z - t}} + x
\end{array}
Initial program 98.0%
+-commutative98.0%
clear-num98.0%
un-div-inv98.1%
Applied egg-rr98.1%
(FPCore (x y z t a)
:precision binary64
(if (<= t -9.2e+76)
(+ y x)
(if (<= t 2.65e-45)
(+ x (/ y (/ a z)))
(if (<= t 2.3e+57)
(* y (- 1.0 (/ z t)))
(if (<= t 3.6e+84) (+ x (/ (* y z) a)) (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9.2e+76) {
tmp = y + x;
} else if (t <= 2.65e-45) {
tmp = x + (y / (a / z));
} else if (t <= 2.3e+57) {
tmp = y * (1.0 - (z / t));
} else if (t <= 3.6e+84) {
tmp = x + ((y * z) / a);
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-9.2d+76)) then
tmp = y + x
else if (t <= 2.65d-45) then
tmp = x + (y / (a / z))
else if (t <= 2.3d+57) then
tmp = y * (1.0d0 - (z / t))
else if (t <= 3.6d+84) then
tmp = x + ((y * z) / a)
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9.2e+76) {
tmp = y + x;
} else if (t <= 2.65e-45) {
tmp = x + (y / (a / z));
} else if (t <= 2.3e+57) {
tmp = y * (1.0 - (z / t));
} else if (t <= 3.6e+84) {
tmp = x + ((y * z) / a);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -9.2e+76: tmp = y + x elif t <= 2.65e-45: tmp = x + (y / (a / z)) elif t <= 2.3e+57: tmp = y * (1.0 - (z / t)) elif t <= 3.6e+84: tmp = x + ((y * z) / a) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9.2e+76) tmp = Float64(y + x); elseif (t <= 2.65e-45) tmp = Float64(x + Float64(y / Float64(a / z))); elseif (t <= 2.3e+57) tmp = Float64(y * Float64(1.0 - Float64(z / t))); elseif (t <= 3.6e+84) tmp = Float64(x + Float64(Float64(y * z) / a)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -9.2e+76) tmp = y + x; elseif (t <= 2.65e-45) tmp = x + (y / (a / z)); elseif (t <= 2.3e+57) tmp = y * (1.0 - (z / t)); elseif (t <= 3.6e+84) tmp = x + ((y * z) / a); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9.2e+76], N[(y + x), $MachinePrecision], If[LessEqual[t, 2.65e-45], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e+57], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e+84], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.2 \cdot 10^{+76}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 2.65 \cdot 10^{-45}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{+57}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+84}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -9.20000000000000005e76 or 3.5999999999999999e84 < t Initial program 100.0%
Taylor expanded in t around inf 88.3%
+-commutative88.3%
Simplified88.3%
if -9.20000000000000005e76 < t < 2.6499999999999999e-45Initial program 96.1%
+-commutative96.1%
clear-num96.1%
un-div-inv96.2%
Applied egg-rr96.2%
Taylor expanded in t around 0 79.9%
if 2.6499999999999999e-45 < t < 2.2999999999999999e57Initial program 99.7%
+-commutative99.7%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 85.6%
mul-1-neg85.6%
unsub-neg85.6%
associate-/l*85.3%
div-sub85.3%
*-inverses85.3%
Simplified85.3%
Taylor expanded in x around 0 58.8%
mul-1-neg58.8%
sub-neg58.8%
metadata-eval58.8%
distribute-rgt-neg-in58.8%
+-commutative58.8%
distribute-neg-in58.8%
metadata-eval58.8%
sub-neg58.8%
Simplified58.8%
if 2.2999999999999999e57 < t < 3.5999999999999999e84Initial program 99.9%
Taylor expanded in t around 0 71.7%
Final simplification81.1%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2e+77)
(+ y x)
(if (<= t 2.65e-45)
(+ x (* y (/ z a)))
(if (<= t 2.7e+54)
(* y (- 1.0 (/ z t)))
(if (<= t 1.7e+85) (+ x (/ (* y z) a)) (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2e+77) {
tmp = y + x;
} else if (t <= 2.65e-45) {
tmp = x + (y * (z / a));
} else if (t <= 2.7e+54) {
tmp = y * (1.0 - (z / t));
} else if (t <= 1.7e+85) {
tmp = x + ((y * z) / a);
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-2d+77)) then
tmp = y + x
else if (t <= 2.65d-45) then
tmp = x + (y * (z / a))
else if (t <= 2.7d+54) then
tmp = y * (1.0d0 - (z / t))
else if (t <= 1.7d+85) then
tmp = x + ((y * z) / a)
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2e+77) {
tmp = y + x;
} else if (t <= 2.65e-45) {
tmp = x + (y * (z / a));
} else if (t <= 2.7e+54) {
tmp = y * (1.0 - (z / t));
} else if (t <= 1.7e+85) {
tmp = x + ((y * z) / a);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2e+77: tmp = y + x elif t <= 2.65e-45: tmp = x + (y * (z / a)) elif t <= 2.7e+54: tmp = y * (1.0 - (z / t)) elif t <= 1.7e+85: tmp = x + ((y * z) / a) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2e+77) tmp = Float64(y + x); elseif (t <= 2.65e-45) tmp = Float64(x + Float64(y * Float64(z / a))); elseif (t <= 2.7e+54) tmp = Float64(y * Float64(1.0 - Float64(z / t))); elseif (t <= 1.7e+85) tmp = Float64(x + Float64(Float64(y * z) / a)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2e+77) tmp = y + x; elseif (t <= 2.65e-45) tmp = x + (y * (z / a)); elseif (t <= 2.7e+54) tmp = y * (1.0 - (z / t)); elseif (t <= 1.7e+85) tmp = x + ((y * z) / a); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2e+77], N[(y + x), $MachinePrecision], If[LessEqual[t, 2.65e-45], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+54], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.7e+85], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+77}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 2.65 \cdot 10^{-45}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+54}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{+85}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -1.99999999999999997e77 or 1.7000000000000002e85 < t Initial program 100.0%
Taylor expanded in t around inf 88.3%
+-commutative88.3%
Simplified88.3%
if -1.99999999999999997e77 < t < 2.6499999999999999e-45Initial program 96.1%
Taylor expanded in t around 0 79.9%
if 2.6499999999999999e-45 < t < 2.70000000000000011e54Initial program 99.7%
+-commutative99.7%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 85.6%
mul-1-neg85.6%
unsub-neg85.6%
associate-/l*85.3%
div-sub85.3%
*-inverses85.3%
Simplified85.3%
Taylor expanded in x around 0 58.8%
mul-1-neg58.8%
sub-neg58.8%
metadata-eval58.8%
distribute-rgt-neg-in58.8%
+-commutative58.8%
distribute-neg-in58.8%
metadata-eval58.8%
sub-neg58.8%
Simplified58.8%
if 2.70000000000000011e54 < t < 1.7000000000000002e85Initial program 99.9%
Taylor expanded in t around 0 71.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z a)))))
(if (<= t -3.75e+77)
(+ y x)
(if (<= t 2.25e-45)
t_1
(if (<= t 9e+54)
(* y (- 1.0 (/ z t)))
(if (<= t 4.1e+77) t_1 (+ y x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / a));
double tmp;
if (t <= -3.75e+77) {
tmp = y + x;
} else if (t <= 2.25e-45) {
tmp = t_1;
} else if (t <= 9e+54) {
tmp = y * (1.0 - (z / t));
} else if (t <= 4.1e+77) {
tmp = t_1;
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / a))
if (t <= (-3.75d+77)) then
tmp = y + x
else if (t <= 2.25d-45) then
tmp = t_1
else if (t <= 9d+54) then
tmp = y * (1.0d0 - (z / t))
else if (t <= 4.1d+77) then
tmp = t_1
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / a));
double tmp;
if (t <= -3.75e+77) {
tmp = y + x;
} else if (t <= 2.25e-45) {
tmp = t_1;
} else if (t <= 9e+54) {
tmp = y * (1.0 - (z / t));
} else if (t <= 4.1e+77) {
tmp = t_1;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / a)) tmp = 0 if t <= -3.75e+77: tmp = y + x elif t <= 2.25e-45: tmp = t_1 elif t <= 9e+54: tmp = y * (1.0 - (z / t)) elif t <= 4.1e+77: tmp = t_1 else: tmp = y + x return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / a))) tmp = 0.0 if (t <= -3.75e+77) tmp = Float64(y + x); elseif (t <= 2.25e-45) tmp = t_1; elseif (t <= 9e+54) tmp = Float64(y * Float64(1.0 - Float64(z / t))); elseif (t <= 4.1e+77) tmp = t_1; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / a)); tmp = 0.0; if (t <= -3.75e+77) tmp = y + x; elseif (t <= 2.25e-45) tmp = t_1; elseif (t <= 9e+54) tmp = y * (1.0 - (z / t)); elseif (t <= 4.1e+77) tmp = t_1; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.75e+77], N[(y + x), $MachinePrecision], If[LessEqual[t, 2.25e-45], t$95$1, If[LessEqual[t, 9e+54], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.1e+77], t$95$1, N[(y + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{a}\\
\mathbf{if}\;t \leq -3.75 \cdot 10^{+77}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{-45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 9 \cdot 10^{+54}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;t \leq 4.1 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -3.74999999999999977e77 or 4.1000000000000001e77 < t Initial program 100.0%
Taylor expanded in t around inf 87.7%
+-commutative87.7%
Simplified87.7%
if -3.74999999999999977e77 < t < 2.2499999999999999e-45 or 8.99999999999999968e54 < t < 4.1000000000000001e77Initial program 96.3%
Taylor expanded in t around 0 79.5%
if 2.2499999999999999e-45 < t < 8.99999999999999968e54Initial program 99.7%
+-commutative99.7%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 85.6%
mul-1-neg85.6%
unsub-neg85.6%
associate-/l*85.3%
div-sub85.3%
*-inverses85.3%
Simplified85.3%
Taylor expanded in x around 0 58.8%
mul-1-neg58.8%
sub-neg58.8%
metadata-eval58.8%
distribute-rgt-neg-in58.8%
+-commutative58.8%
distribute-neg-in58.8%
metadata-eval58.8%
sub-neg58.8%
Simplified58.8%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.55e+77)
(+ y x)
(if (<= t 1.25e-89)
(+ x (/ y (/ a z)))
(if (<= t 3.2e+87) (- x (/ (* y z) t)) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.55e+77) {
tmp = y + x;
} else if (t <= 1.25e-89) {
tmp = x + (y / (a / z));
} else if (t <= 3.2e+87) {
tmp = x - ((y * z) / t);
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.55d+77)) then
tmp = y + x
else if (t <= 1.25d-89) then
tmp = x + (y / (a / z))
else if (t <= 3.2d+87) then
tmp = x - ((y * z) / t)
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.55e+77) {
tmp = y + x;
} else if (t <= 1.25e-89) {
tmp = x + (y / (a / z));
} else if (t <= 3.2e+87) {
tmp = x - ((y * z) / t);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.55e+77: tmp = y + x elif t <= 1.25e-89: tmp = x + (y / (a / z)) elif t <= 3.2e+87: tmp = x - ((y * z) / t) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.55e+77) tmp = Float64(y + x); elseif (t <= 1.25e-89) tmp = Float64(x + Float64(y / Float64(a / z))); elseif (t <= 3.2e+87) tmp = Float64(x - Float64(Float64(y * z) / t)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.55e+77) tmp = y + x; elseif (t <= 1.25e-89) tmp = x + (y / (a / z)); elseif (t <= 3.2e+87) tmp = x - ((y * z) / t); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.55e+77], N[(y + x), $MachinePrecision], If[LessEqual[t, 1.25e-89], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+87], N[(x - N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{+77}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-89}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+87}:\\
\;\;\;\;x - \frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -1.54999999999999999e77 or 3.2e87 < t Initial program 100.0%
Taylor expanded in t around inf 88.3%
+-commutative88.3%
Simplified88.3%
if -1.54999999999999999e77 < t < 1.24999999999999992e-89Initial program 95.9%
+-commutative95.9%
clear-num95.9%
un-div-inv96.0%
Applied egg-rr96.0%
Taylor expanded in t around 0 80.4%
if 1.24999999999999992e-89 < t < 3.2e87Initial program 99.8%
Taylor expanded in z around inf 86.8%
Taylor expanded in a around 0 79.3%
mul-1-neg79.3%
unsub-neg79.3%
Simplified79.3%
Final simplification83.3%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1e+77)
(+ y x)
(if (<= t 1.25e-89)
(+ x (/ y (/ a z)))
(if (<= t 4e+87) (- x (/ y (/ t z))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1e+77) {
tmp = y + x;
} else if (t <= 1.25e-89) {
tmp = x + (y / (a / z));
} else if (t <= 4e+87) {
tmp = x - (y / (t / z));
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1d+77)) then
tmp = y + x
else if (t <= 1.25d-89) then
tmp = x + (y / (a / z))
else if (t <= 4d+87) then
tmp = x - (y / (t / z))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1e+77) {
tmp = y + x;
} else if (t <= 1.25e-89) {
tmp = x + (y / (a / z));
} else if (t <= 4e+87) {
tmp = x - (y / (t / z));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1e+77: tmp = y + x elif t <= 1.25e-89: tmp = x + (y / (a / z)) elif t <= 4e+87: tmp = x - (y / (t / z)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1e+77) tmp = Float64(y + x); elseif (t <= 1.25e-89) tmp = Float64(x + Float64(y / Float64(a / z))); elseif (t <= 4e+87) tmp = Float64(x - Float64(y / Float64(t / z))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1e+77) tmp = y + x; elseif (t <= 1.25e-89) tmp = x + (y / (a / z)); elseif (t <= 4e+87) tmp = x - (y / (t / z)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1e+77], N[(y + x), $MachinePrecision], If[LessEqual[t, 1.25e-89], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e+87], N[(x - N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{+77}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-89}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+87}:\\
\;\;\;\;x - \frac{y}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -9.99999999999999983e76 or 3.9999999999999998e87 < t Initial program 100.0%
Taylor expanded in t around inf 88.3%
+-commutative88.3%
Simplified88.3%
if -9.99999999999999983e76 < t < 1.24999999999999992e-89Initial program 95.9%
+-commutative95.9%
clear-num95.9%
un-div-inv96.0%
Applied egg-rr96.0%
Taylor expanded in t around 0 80.4%
if 1.24999999999999992e-89 < t < 3.9999999999999998e87Initial program 99.8%
Taylor expanded in z around inf 86.8%
Taylor expanded in a around 0 79.3%
mul-1-neg79.3%
unsub-neg79.3%
Simplified79.3%
associate-/l*79.1%
clear-num79.2%
un-div-inv79.3%
Applied egg-rr79.3%
Final simplification83.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -8e+180) (not (<= t 3.3e+89))) (+ y x) (+ x (* y (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -8e+180) || !(t <= 3.3e+89)) {
tmp = y + x;
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-8d+180)) .or. (.not. (t <= 3.3d+89))) then
tmp = y + x
else
tmp = x + (y * (z / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -8e+180) || !(t <= 3.3e+89)) {
tmp = y + x;
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -8e+180) or not (t <= 3.3e+89): tmp = y + x else: tmp = x + (y * (z / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -8e+180) || !(t <= 3.3e+89)) tmp = Float64(y + x); else tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -8e+180) || ~((t <= 3.3e+89))) tmp = y + x; else tmp = x + (y * (z / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -8e+180], N[Not[LessEqual[t, 3.3e+89]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{+180} \lor \neg \left(t \leq 3.3 \cdot 10^{+89}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if t < -8.0000000000000001e180 or 3.29999999999999974e89 < t Initial program 100.0%
Taylor expanded in t around inf 90.9%
+-commutative90.9%
Simplified90.9%
if -8.0000000000000001e180 < t < 3.29999999999999974e89Initial program 97.1%
Taylor expanded in z around inf 85.6%
associate-/l*86.7%
Simplified86.7%
Final simplification88.1%
(FPCore (x y z t a)
:precision binary64
(if (<= t -9e+61)
(+ x (/ y (- 1.0 (/ a t))))
(if (<= t 1.25e+87)
(+ x (/ y (/ (- a t) z)))
(- x (* y (+ (/ z t) -1.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9e+61) {
tmp = x + (y / (1.0 - (a / t)));
} else if (t <= 1.25e+87) {
tmp = x + (y / ((a - t) / z));
} else {
tmp = x - (y * ((z / t) + -1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-9d+61)) then
tmp = x + (y / (1.0d0 - (a / t)))
else if (t <= 1.25d+87) then
tmp = x + (y / ((a - t) / z))
else
tmp = x - (y * ((z / t) + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9e+61) {
tmp = x + (y / (1.0 - (a / t)));
} else if (t <= 1.25e+87) {
tmp = x + (y / ((a - t) / z));
} else {
tmp = x - (y * ((z / t) + -1.0));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -9e+61: tmp = x + (y / (1.0 - (a / t))) elif t <= 1.25e+87: tmp = x + (y / ((a - t) / z)) else: tmp = x - (y * ((z / t) + -1.0)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9e+61) tmp = Float64(x + Float64(y / Float64(1.0 - Float64(a / t)))); elseif (t <= 1.25e+87) tmp = Float64(x + Float64(y / Float64(Float64(a - t) / z))); else tmp = Float64(x - Float64(y * Float64(Float64(z / t) + -1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -9e+61) tmp = x + (y / (1.0 - (a / t))); elseif (t <= 1.25e+87) tmp = x + (y / ((a - t) / z)); else tmp = x - (y * ((z / t) + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9e+61], N[(x + N[(y / N[(1.0 - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e+87], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(z / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{+61}:\\
\;\;\;\;x + \frac{y}{1 - \frac{a}{t}}\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+87}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\
\end{array}
\end{array}
if t < -9e61Initial program 100.0%
+-commutative100.0%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 88.4%
mul-1-neg88.4%
div-sub88.4%
sub-neg88.4%
*-inverses88.4%
metadata-eval88.4%
Simplified88.4%
Taylor expanded in y around 0 88.4%
if -9e61 < t < 1.24999999999999995e87Initial program 96.8%
+-commutative96.8%
clear-num96.8%
un-div-inv96.9%
Applied egg-rr96.9%
Taylor expanded in z around inf 89.0%
if 1.24999999999999995e87 < t Initial program 100.0%
Taylor expanded in a around 0 74.3%
mul-1-neg74.3%
unsub-neg74.3%
associate-/l*100.0%
div-sub100.0%
sub-neg100.0%
*-inverses100.0%
metadata-eval100.0%
Simplified100.0%
Final simplification91.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.55e+63) (+ x (/ y (- 1.0 (/ a t)))) (if (<= t 1.04e+86) (+ x (/ y (/ (- a t) z))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.55e+63) {
tmp = x + (y / (1.0 - (a / t)));
} else if (t <= 1.04e+86) {
tmp = x + (y / ((a - t) / z));
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.55d+63)) then
tmp = x + (y / (1.0d0 - (a / t)))
else if (t <= 1.04d+86) then
tmp = x + (y / ((a - t) / z))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.55e+63) {
tmp = x + (y / (1.0 - (a / t)));
} else if (t <= 1.04e+86) {
tmp = x + (y / ((a - t) / z));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.55e+63: tmp = x + (y / (1.0 - (a / t))) elif t <= 1.04e+86: tmp = x + (y / ((a - t) / z)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.55e+63) tmp = Float64(x + Float64(y / Float64(1.0 - Float64(a / t)))); elseif (t <= 1.04e+86) tmp = Float64(x + Float64(y / Float64(Float64(a - t) / z))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.55e+63) tmp = x + (y / (1.0 - (a / t))); elseif (t <= 1.04e+86) tmp = x + (y / ((a - t) / z)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.55e+63], N[(x + N[(y / N[(1.0 - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.04e+86], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{+63}:\\
\;\;\;\;x + \frac{y}{1 - \frac{a}{t}}\\
\mathbf{elif}\;t \leq 1.04 \cdot 10^{+86}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -1.55e63Initial program 100.0%
+-commutative100.0%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 88.4%
mul-1-neg88.4%
div-sub88.4%
sub-neg88.4%
*-inverses88.4%
metadata-eval88.4%
Simplified88.4%
Taylor expanded in y around 0 88.4%
if -1.55e63 < t < 1.04000000000000004e86Initial program 96.8%
+-commutative96.8%
clear-num96.8%
un-div-inv96.9%
Applied egg-rr96.9%
Taylor expanded in z around inf 89.0%
if 1.04000000000000004e86 < t Initial program 100.0%
Taylor expanded in t around inf 92.8%
+-commutative92.8%
Simplified92.8%
Final simplification89.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.5e+62) (+ x (/ y (- 1.0 (/ a t)))) (if (<= t 1.65e+88) (+ x (/ (* y z) (- a t))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.5e+62) {
tmp = x + (y / (1.0 - (a / t)));
} else if (t <= 1.65e+88) {
tmp = x + ((y * z) / (a - t));
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-2.5d+62)) then
tmp = x + (y / (1.0d0 - (a / t)))
else if (t <= 1.65d+88) then
tmp = x + ((y * z) / (a - t))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.5e+62) {
tmp = x + (y / (1.0 - (a / t)));
} else if (t <= 1.65e+88) {
tmp = x + ((y * z) / (a - t));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.5e+62: tmp = x + (y / (1.0 - (a / t))) elif t <= 1.65e+88: tmp = x + ((y * z) / (a - t)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.5e+62) tmp = Float64(x + Float64(y / Float64(1.0 - Float64(a / t)))); elseif (t <= 1.65e+88) tmp = Float64(x + Float64(Float64(y * z) / Float64(a - t))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.5e+62) tmp = x + (y / (1.0 - (a / t))); elseif (t <= 1.65e+88) tmp = x + ((y * z) / (a - t)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.5e+62], N[(x + N[(y / N[(1.0 - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e+88], N[(x + N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+62}:\\
\;\;\;\;x + \frac{y}{1 - \frac{a}{t}}\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{+88}:\\
\;\;\;\;x + \frac{y \cdot z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -2.50000000000000014e62Initial program 100.0%
+-commutative100.0%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 88.4%
mul-1-neg88.4%
div-sub88.4%
sub-neg88.4%
*-inverses88.4%
metadata-eval88.4%
Simplified88.4%
Taylor expanded in y around 0 88.4%
if -2.50000000000000014e62 < t < 1.6500000000000002e88Initial program 96.8%
Taylor expanded in z around inf 88.9%
if 1.6500000000000002e88 < t Initial program 100.0%
Taylor expanded in t around inf 92.8%
+-commutative92.8%
Simplified92.8%
Final simplification89.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -7.4e+84) (not (<= y 3.4e+169))) (* y (- 1.0 (/ z t))) (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -7.4e+84) || !(y <= 3.4e+169)) {
tmp = y * (1.0 - (z / t));
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-7.4d+84)) .or. (.not. (y <= 3.4d+169))) then
tmp = y * (1.0d0 - (z / t))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -7.4e+84) || !(y <= 3.4e+169)) {
tmp = y * (1.0 - (z / t));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -7.4e+84) or not (y <= 3.4e+169): tmp = y * (1.0 - (z / t)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -7.4e+84) || !(y <= 3.4e+169)) tmp = Float64(y * Float64(1.0 - Float64(z / t))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -7.4e+84) || ~((y <= 3.4e+169))) tmp = y * (1.0 - (z / t)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -7.4e+84], N[Not[LessEqual[y, 3.4e+169]], $MachinePrecision]], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.4 \cdot 10^{+84} \lor \neg \left(y \leq 3.4 \cdot 10^{+169}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if y < -7.4e84 or 3.40000000000000028e169 < y Initial program 98.6%
+-commutative98.6%
clear-num98.6%
un-div-inv98.7%
Applied egg-rr98.7%
Taylor expanded in a around 0 39.4%
mul-1-neg39.4%
unsub-neg39.4%
associate-/l*65.8%
div-sub65.8%
*-inverses65.8%
Simplified65.8%
Taylor expanded in x around 0 60.1%
mul-1-neg60.1%
sub-neg60.1%
metadata-eval60.1%
distribute-rgt-neg-in60.1%
+-commutative60.1%
distribute-neg-in60.1%
metadata-eval60.1%
sub-neg60.1%
Simplified60.1%
if -7.4e84 < y < 3.40000000000000028e169Initial program 97.8%
Taylor expanded in t around inf 67.0%
+-commutative67.0%
Simplified67.0%
Final simplification64.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.2e+220) (not (<= z 8.6e+253))) (* z (/ (- y) t)) (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.2e+220) || !(z <= 8.6e+253)) {
tmp = z * (-y / t);
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-4.2d+220)) .or. (.not. (z <= 8.6d+253))) then
tmp = z * (-y / t)
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.2e+220) || !(z <= 8.6e+253)) {
tmp = z * (-y / t);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.2e+220) or not (z <= 8.6e+253): tmp = z * (-y / t) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.2e+220) || !(z <= 8.6e+253)) tmp = Float64(z * Float64(Float64(-y) / t)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.2e+220) || ~((z <= 8.6e+253))) tmp = z * (-y / t); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.2e+220], N[Not[LessEqual[z, 8.6e+253]], $MachinePrecision]], N[(z * N[((-y) / t), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+220} \lor \neg \left(z \leq 8.6 \cdot 10^{+253}\right):\\
\;\;\;\;z \cdot \frac{-y}{t}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -4.20000000000000014e220 or 8.5999999999999997e253 < z Initial program 91.7%
+-commutative91.7%
clear-num91.7%
un-div-inv91.8%
Applied egg-rr91.8%
Taylor expanded in a around 0 65.9%
mul-1-neg65.9%
unsub-neg65.9%
associate-/l*62.8%
div-sub62.8%
*-inverses62.8%
Simplified62.8%
Taylor expanded in x around 0 54.4%
mul-1-neg54.4%
sub-neg54.4%
metadata-eval54.4%
distribute-rgt-neg-in54.4%
+-commutative54.4%
distribute-neg-in54.4%
metadata-eval54.4%
sub-neg54.4%
Simplified54.4%
Taylor expanded in z around inf 54.6%
mul-1-neg54.6%
associate-*l/56.8%
distribute-lft-neg-in56.8%
distribute-neg-frac256.8%
Simplified56.8%
if -4.20000000000000014e220 < z < 8.5999999999999997e253Initial program 99.0%
Taylor expanded in t around inf 65.5%
+-commutative65.5%
Simplified65.5%
Final simplification64.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.9e-126) (not (<= t 7.8e-161))) (+ y x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.9e-126) || !(t <= 7.8e-161)) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-2.9d-126)) .or. (.not. (t <= 7.8d-161))) then
tmp = y + x
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.9e-126) || !(t <= 7.8e-161)) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.9e-126) or not (t <= 7.8e-161): tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.9e-126) || !(t <= 7.8e-161)) tmp = Float64(y + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.9e-126) || ~((t <= 7.8e-161))) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.9e-126], N[Not[LessEqual[t, 7.8e-161]], $MachinePrecision]], N[(y + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.9 \cdot 10^{-126} \lor \neg \left(t \leq 7.8 \cdot 10^{-161}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -2.89999999999999988e-126 or 7.79999999999999947e-161 < t Initial program 98.9%
Taylor expanded in t around inf 68.8%
+-commutative68.8%
Simplified68.8%
if -2.89999999999999988e-126 < t < 7.79999999999999947e-161Initial program 95.7%
Taylor expanded in x around inf 46.3%
Final simplification62.8%
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
Initial program 98.0%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 98.0%
Taylor expanded in x around inf 48.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) (- a t))))))
(if (< y -8.508084860551241e-17)
t_1
(if (< y 2.894426862792089e-49)
(+ x (* (* y (- z t)) (/ 1.0 (- a t))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double tmp;
if (y < -8.508084860551241e-17) {
tmp = t_1;
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) * (1.0 / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * ((z - t) / (a - t)))
if (y < (-8.508084860551241d-17)) then
tmp = t_1
else if (y < 2.894426862792089d-49) then
tmp = x + ((y * (z - t)) * (1.0d0 / (a - t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double tmp;
if (y < -8.508084860551241e-17) {
tmp = t_1;
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) * (1.0 / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / (a - t))) tmp = 0 if y < -8.508084860551241e-17: tmp = t_1 elif y < 2.894426862792089e-49: tmp = x + ((y * (z - t)) * (1.0 / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (y < -8.508084860551241e-17) tmp = t_1; elseif (y < 2.894426862792089e-49) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) * Float64(1.0 / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - t) / (a - t))); tmp = 0.0; if (y < -8.508084860551241e-17) tmp = t_1; elseif (y < 2.894426862792089e-49) tmp = x + ((y * (z - t)) * (1.0 / (a - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -8.508084860551241e-17], t$95$1, If[Less[y, 2.894426862792089e-49], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y < -8.508084860551241 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024095
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"
:precision binary64
:alt
(if (< y -8.508084860551241e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.894426862792089e-49) (+ x (* (* y (- z t)) (/ 1.0 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))
(+ x (* y (/ (- z t) (- a t)))))