
(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(Float64(y * 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[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{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(Float64(y * 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[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- z t) y) (- a t))))
(if (<= t_1 (- INFINITY))
(+ x (/ (- z t) (/ (- a t) y)))
(if (<= t_1 5e+246) (+ x t_1) (fma (/ y (- a t)) (- z t) x)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((z - t) * y) / (a - t);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x + ((z - t) / ((a - t) / y));
} else if (t_1 <= 5e+246) {
tmp = x + t_1;
} else {
tmp = fma((y / (a - t)), (z - t), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(z - t) * y) / Float64(a - t)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x + Float64(Float64(z - t) / Float64(Float64(a - t) / y))); elseif (t_1 <= 5e+246) tmp = Float64(x + t_1); else tmp = fma(Float64(y / Float64(a - t)), Float64(z - t), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x + N[(N[(z - t), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+246], N[(x + t$95$1), $MachinePrecision], N[(N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(z - t), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;x + \frac{z - t}{\frac{a - t}{y}}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+246}:\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a - t}, z - t, x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) < -inf.0Initial program 31.9%
*-commutative31.9%
associate-/l*100.0%
Simplified100.0%
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) < 4.99999999999999976e246Initial program 99.8%
if 4.99999999999999976e246 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) Initial program 50.6%
+-commutative50.6%
associate-*l/99.9%
fma-def99.9%
Simplified99.9%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (fma (/ (- z t) (- a t)) y x))
double code(double x, double y, double z, double t, double a) {
return fma(((z - t) / (a - t)), y, x);
}
function code(x, y, z, t, a) return fma(Float64(Float64(z - t) / Float64(a - t)), y, x) end
code[x_, y_, z_, t_, a_] := N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{z - t}{a - t}, y, x\right)
\end{array}
Initial program 87.3%
+-commutative87.3%
*-commutative87.3%
associate-*l/98.0%
fma-def98.0%
Simplified98.0%
Final simplification98.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- z t) y) (- a t))))
(if (<= t_1 (- INFINITY))
(+ x (/ (- z t) (/ (- a t) y)))
(if (<= t_1 5e+246) (+ x t_1) (+ x (/ (- z t) (/ 1.0 (/ y (- a t)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((z - t) * y) / (a - t);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x + ((z - t) / ((a - t) / y));
} else if (t_1 <= 5e+246) {
tmp = x + t_1;
} else {
tmp = x + ((z - t) / (1.0 / (y / (a - t))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((z - t) * y) / (a - t);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = x + ((z - t) / ((a - t) / y));
} else if (t_1 <= 5e+246) {
tmp = x + t_1;
} else {
tmp = x + ((z - t) / (1.0 / (y / (a - t))));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((z - t) * y) / (a - t) tmp = 0 if t_1 <= -math.inf: tmp = x + ((z - t) / ((a - t) / y)) elif t_1 <= 5e+246: tmp = x + t_1 else: tmp = x + ((z - t) / (1.0 / (y / (a - t)))) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(z - t) * y) / Float64(a - t)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x + Float64(Float64(z - t) / Float64(Float64(a - t) / y))); elseif (t_1 <= 5e+246) tmp = Float64(x + t_1); else tmp = Float64(x + Float64(Float64(z - t) / Float64(1.0 / Float64(y / Float64(a - t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((z - t) * y) / (a - t); tmp = 0.0; if (t_1 <= -Inf) tmp = x + ((z - t) / ((a - t) / y)); elseif (t_1 <= 5e+246) tmp = x + t_1; else tmp = x + ((z - t) / (1.0 / (y / (a - t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x + N[(N[(z - t), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+246], N[(x + t$95$1), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] / N[(1.0 / N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;x + \frac{z - t}{\frac{a - t}{y}}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+246}:\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z - t}{\frac{1}{\frac{y}{a - t}}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) < -inf.0Initial program 31.9%
*-commutative31.9%
associate-/l*100.0%
Simplified100.0%
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) < 4.99999999999999976e246Initial program 99.8%
if 4.99999999999999976e246 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) Initial program 50.6%
*-commutative50.6%
associate-/l*99.7%
Simplified99.7%
clear-num99.8%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- z t) y) (- a t))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+289)))
(+ x (/ (- z t) (/ (- a t) y)))
(+ x t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((z - t) * y) / (a - t);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+289)) {
tmp = x + ((z - t) / ((a - t) / y));
} else {
tmp = x + t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((z - t) * y) / (a - t);
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 2e+289)) {
tmp = x + ((z - t) / ((a - t) / y));
} else {
tmp = x + t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((z - t) * y) / (a - t) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 2e+289): tmp = x + ((z - t) / ((a - t) / y)) else: tmp = x + t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(z - t) * y) / Float64(a - t)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+289)) tmp = Float64(x + Float64(Float64(z - t) / Float64(Float64(a - t) / y))); else tmp = Float64(x + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((z - t) * y) / (a - t); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 2e+289))) tmp = x + ((z - t) / ((a - t) / y)); else tmp = x + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+289]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 2 \cdot 10^{+289}\right):\\
\;\;\;\;x + \frac{z - t}{\frac{a - t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + t_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) < -inf.0 or 2.0000000000000001e289 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) Initial program 38.1%
*-commutative38.1%
associate-/l*99.9%
Simplified99.9%
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) < 2.0000000000000001e289Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= t -3.5e+32)
(+ y x)
(if (<= t -9.8e-89)
(- x (/ y (/ t z)))
(if (or (<= t -2.05e-103) (not (<= t 1.7e-52)))
(+ y x)
(+ x (/ y (/ a z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.5e+32) {
tmp = y + x;
} else if (t <= -9.8e-89) {
tmp = x - (y / (t / z));
} else if ((t <= -2.05e-103) || !(t <= 1.7e-52)) {
tmp = y + x;
} else {
tmp = x + (y / (a / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-3.5d+32)) then
tmp = y + x
else if (t <= (-9.8d-89)) then
tmp = x - (y / (t / z))
else if ((t <= (-2.05d-103)) .or. (.not. (t <= 1.7d-52))) then
tmp = y + x
else
tmp = x + (y / (a / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.5e+32) {
tmp = y + x;
} else if (t <= -9.8e-89) {
tmp = x - (y / (t / z));
} else if ((t <= -2.05e-103) || !(t <= 1.7e-52)) {
tmp = y + x;
} else {
tmp = x + (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.5e+32: tmp = y + x elif t <= -9.8e-89: tmp = x - (y / (t / z)) elif (t <= -2.05e-103) or not (t <= 1.7e-52): tmp = y + x else: tmp = x + (y / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.5e+32) tmp = Float64(y + x); elseif (t <= -9.8e-89) tmp = Float64(x - Float64(y / Float64(t / z))); elseif ((t <= -2.05e-103) || !(t <= 1.7e-52)) tmp = Float64(y + x); else tmp = Float64(x + Float64(y / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.5e+32) tmp = y + x; elseif (t <= -9.8e-89) tmp = x - (y / (t / z)); elseif ((t <= -2.05e-103) || ~((t <= 1.7e-52))) tmp = y + x; else tmp = x + (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.5e+32], N[(y + x), $MachinePrecision], If[LessEqual[t, -9.8e-89], N[(x - N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -2.05e-103], N[Not[LessEqual[t, 1.7e-52]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.5 \cdot 10^{+32}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq -9.8 \cdot 10^{-89}:\\
\;\;\;\;x - \frac{y}{\frac{t}{z}}\\
\mathbf{elif}\;t \leq -2.05 \cdot 10^{-103} \lor \neg \left(t \leq 1.7 \cdot 10^{-52}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if t < -3.5000000000000001e32 or -9.8e-89 < t < -2.04999999999999998e-103 or 1.70000000000000009e-52 < t Initial program 81.4%
Taylor expanded in t around inf 78.2%
+-commutative78.2%
Simplified78.2%
if -3.5000000000000001e32 < t < -9.8e-89Initial program 93.7%
Taylor expanded in z around inf 81.9%
associate-*l/85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in a around 0 69.7%
mul-1-neg69.7%
unsub-neg69.7%
associate-/l*69.7%
Simplified69.7%
if -2.04999999999999998e-103 < t < 1.70000000000000009e-52Initial program 94.3%
Taylor expanded in t around 0 80.1%
+-commutative80.1%
associate-/l*83.7%
Simplified83.7%
Final simplification79.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.3e+31)
(+ y x)
(if (<= t -1.4e-89)
(- x (/ (* z y) t))
(if (<= t -2.05e-103)
(+ y x)
(if (<= t 3.2e-51) (+ x (/ y (/ a z))) (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.3e+31) {
tmp = y + x;
} else if (t <= -1.4e-89) {
tmp = x - ((z * y) / t);
} else if (t <= -2.05e-103) {
tmp = y + x;
} else if (t <= 3.2e-51) {
tmp = x + (y / (a / 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 <= (-2.3d+31)) then
tmp = y + x
else if (t <= (-1.4d-89)) then
tmp = x - ((z * y) / t)
else if (t <= (-2.05d-103)) then
tmp = y + x
else if (t <= 3.2d-51) then
tmp = x + (y / (a / 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 <= -2.3e+31) {
tmp = y + x;
} else if (t <= -1.4e-89) {
tmp = x - ((z * y) / t);
} else if (t <= -2.05e-103) {
tmp = y + x;
} else if (t <= 3.2e-51) {
tmp = x + (y / (a / z));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.3e+31: tmp = y + x elif t <= -1.4e-89: tmp = x - ((z * y) / t) elif t <= -2.05e-103: tmp = y + x elif t <= 3.2e-51: tmp = x + (y / (a / z)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.3e+31) tmp = Float64(y + x); elseif (t <= -1.4e-89) tmp = Float64(x - Float64(Float64(z * y) / t)); elseif (t <= -2.05e-103) tmp = Float64(y + x); elseif (t <= 3.2e-51) tmp = Float64(x + Float64(y / Float64(a / z))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.3e+31) tmp = y + x; elseif (t <= -1.4e-89) tmp = x - ((z * y) / t); elseif (t <= -2.05e-103) tmp = y + x; elseif (t <= 3.2e-51) tmp = x + (y / (a / z)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.3e+31], N[(y + x), $MachinePrecision], If[LessEqual[t, -1.4e-89], N[(x - N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.05e-103], N[(y + x), $MachinePrecision], If[LessEqual[t, 3.2e-51], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{+31}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq -1.4 \cdot 10^{-89}:\\
\;\;\;\;x - \frac{z \cdot y}{t}\\
\mathbf{elif}\;t \leq -2.05 \cdot 10^{-103}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-51}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -2.3e31 or -1.3999999999999999e-89 < t < -2.04999999999999998e-103 or 3.2e-51 < t Initial program 81.4%
Taylor expanded in t around inf 78.2%
+-commutative78.2%
Simplified78.2%
if -2.3e31 < t < -1.3999999999999999e-89Initial program 93.7%
Taylor expanded in a around 0 81.4%
mul-1-neg81.4%
unsub-neg81.4%
associate-/l*81.4%
Simplified81.4%
Taylor expanded in t around 0 69.7%
if -2.04999999999999998e-103 < t < 3.2e-51Initial program 94.3%
Taylor expanded in t around 0 80.1%
+-commutative80.1%
associate-/l*83.7%
Simplified83.7%
Final simplification79.1%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6.5e+31)
(+ y x)
(if (<= t -8.5e-89)
(- x (* z (/ y t)))
(if (<= t -2e-103)
(+ y x)
(if (<= t 3.4e-49) (+ x (/ y (/ a z))) (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.5e+31) {
tmp = y + x;
} else if (t <= -8.5e-89) {
tmp = x - (z * (y / t));
} else if (t <= -2e-103) {
tmp = y + x;
} else if (t <= 3.4e-49) {
tmp = x + (y / (a / 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 <= (-6.5d+31)) then
tmp = y + x
else if (t <= (-8.5d-89)) then
tmp = x - (z * (y / t))
else if (t <= (-2d-103)) then
tmp = y + x
else if (t <= 3.4d-49) then
tmp = x + (y / (a / 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 <= -6.5e+31) {
tmp = y + x;
} else if (t <= -8.5e-89) {
tmp = x - (z * (y / t));
} else if (t <= -2e-103) {
tmp = y + x;
} else if (t <= 3.4e-49) {
tmp = x + (y / (a / z));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.5e+31: tmp = y + x elif t <= -8.5e-89: tmp = x - (z * (y / t)) elif t <= -2e-103: tmp = y + x elif t <= 3.4e-49: tmp = x + (y / (a / z)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.5e+31) tmp = Float64(y + x); elseif (t <= -8.5e-89) tmp = Float64(x - Float64(z * Float64(y / t))); elseif (t <= -2e-103) tmp = Float64(y + x); elseif (t <= 3.4e-49) tmp = Float64(x + Float64(y / Float64(a / z))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6.5e+31) tmp = y + x; elseif (t <= -8.5e-89) tmp = x - (z * (y / t)); elseif (t <= -2e-103) tmp = y + x; elseif (t <= 3.4e-49) tmp = x + (y / (a / z)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.5e+31], N[(y + x), $MachinePrecision], If[LessEqual[t, -8.5e-89], N[(x - N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2e-103], N[(y + x), $MachinePrecision], If[LessEqual[t, 3.4e-49], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+31}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq -8.5 \cdot 10^{-89}:\\
\;\;\;\;x - z \cdot \frac{y}{t}\\
\mathbf{elif}\;t \leq -2 \cdot 10^{-103}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-49}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -6.5000000000000004e31 or -8.49999999999999937e-89 < t < -1.99999999999999992e-103 or 3.40000000000000005e-49 < t Initial program 81.4%
Taylor expanded in t around inf 78.2%
+-commutative78.2%
Simplified78.2%
if -6.5000000000000004e31 < t < -8.49999999999999937e-89Initial program 93.7%
Taylor expanded in z around inf 81.9%
associate-*l/85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in a around 0 69.8%
associate-*r/69.8%
neg-mul-169.8%
Simplified69.8%
if -1.99999999999999992e-103 < t < 3.40000000000000005e-49Initial program 94.3%
Taylor expanded in t around 0 80.1%
+-commutative80.1%
associate-/l*83.7%
Simplified83.7%
Final simplification79.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.82e+155) (not (<= t 8.4e+71))) (- x (* y (/ t (- a t)))) (+ x (/ (* (- z t) y) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.82e+155) || !(t <= 8.4e+71)) {
tmp = x - (y * (t / (a - t)));
} else {
tmp = x + (((z - t) * y) / (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 <= (-1.82d+155)) .or. (.not. (t <= 8.4d+71))) then
tmp = x - (y * (t / (a - t)))
else
tmp = x + (((z - t) * y) / (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 <= -1.82e+155) || !(t <= 8.4e+71)) {
tmp = x - (y * (t / (a - t)));
} else {
tmp = x + (((z - t) * y) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.82e+155) or not (t <= 8.4e+71): tmp = x - (y * (t / (a - t))) else: tmp = x + (((z - t) * y) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.82e+155) || !(t <= 8.4e+71)) tmp = Float64(x - Float64(y * Float64(t / Float64(a - t)))); else tmp = Float64(x + Float64(Float64(Float64(z - t) * y) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.82e+155) || ~((t <= 8.4e+71))) tmp = x - (y * (t / (a - t))); else tmp = x + (((z - t) * y) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.82e+155], N[Not[LessEqual[t, 8.4e+71]], $MachinePrecision]], N[(x - N[(y * N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.82 \cdot 10^{+155} \lor \neg \left(t \leq 8.4 \cdot 10^{+71}\right):\\
\;\;\;\;x - y \cdot \frac{t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\left(z - t\right) \cdot y}{a - t}\\
\end{array}
\end{array}
if t < -1.81999999999999989e155 or 8.39999999999999957e71 < t Initial program 74.8%
Taylor expanded in z around 0 71.7%
mul-1-neg71.7%
associate-*l/95.0%
unsub-neg95.0%
*-commutative95.0%
Simplified95.0%
if -1.81999999999999989e155 < t < 8.39999999999999957e71Initial program 93.7%
Final simplification94.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.75e+156) (not (<= t 6e+204))) (+ y x) (+ x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.75e+156) || !(t <= 6e+204)) {
tmp = y + x;
} else {
tmp = x + (z * (y / (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 <= (-2.75d+156)) .or. (.not. (t <= 6d+204))) then
tmp = y + x
else
tmp = x + (z * (y / (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 <= -2.75e+156) || !(t <= 6e+204)) {
tmp = y + x;
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.75e+156) or not (t <= 6e+204): tmp = y + x else: tmp = x + (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.75e+156) || !(t <= 6e+204)) tmp = Float64(y + x); else tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.75e+156) || ~((t <= 6e+204))) tmp = y + x; else tmp = x + (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.75e+156], N[Not[LessEqual[t, 6e+204]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.75 \cdot 10^{+156} \lor \neg \left(t \leq 6 \cdot 10^{+204}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if t < -2.7500000000000001e156 or 5.99999999999999965e204 < t Initial program 69.8%
Taylor expanded in t around inf 92.3%
+-commutative92.3%
Simplified92.3%
if -2.7500000000000001e156 < t < 5.99999999999999965e204Initial program 92.3%
Taylor expanded in z around inf 79.9%
associate-*l/83.4%
*-commutative83.4%
Simplified83.4%
Final simplification85.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6.6e-32) (not (<= z 12500000000.0))) (+ x (* z (/ y (- a t)))) (- x (* y (/ t (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.6e-32) || !(z <= 12500000000.0)) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = x - (y * (t / (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 ((z <= (-6.6d-32)) .or. (.not. (z <= 12500000000.0d0))) then
tmp = x + (z * (y / (a - t)))
else
tmp = x - (y * (t / (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 ((z <= -6.6e-32) || !(z <= 12500000000.0)) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = x - (y * (t / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -6.6e-32) or not (z <= 12500000000.0): tmp = x + (z * (y / (a - t))) else: tmp = x - (y * (t / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6.6e-32) || !(z <= 12500000000.0)) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); else tmp = Float64(x - Float64(y * Float64(t / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -6.6e-32) || ~((z <= 12500000000.0))) tmp = x + (z * (y / (a - t))); else tmp = x - (y * (t / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6.6e-32], N[Not[LessEqual[z, 12500000000.0]], $MachinePrecision]], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.6 \cdot 10^{-32} \lor \neg \left(z \leq 12500000000\right):\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{t}{a - t}\\
\end{array}
\end{array}
if z < -6.60000000000000051e-32 or 1.25e10 < z Initial program 83.9%
Taylor expanded in z around inf 81.8%
associate-*l/90.2%
*-commutative90.2%
Simplified90.2%
if -6.60000000000000051e-32 < z < 1.25e10Initial program 90.2%
Taylor expanded in z around 0 83.6%
mul-1-neg83.6%
associate-*l/93.2%
unsub-neg93.2%
*-commutative93.2%
Simplified93.2%
Final simplification91.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.5e-103) (not (<= t 2.6e-56))) (+ y x) (+ x (/ (* z y) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.5e-103) || !(t <= 2.6e-56)) {
tmp = y + x;
} else {
tmp = x + ((z * y) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.5d-103)) .or. (.not. (t <= 2.6d-56))) then
tmp = y + x
else
tmp = x + ((z * y) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.5e-103) || !(t <= 2.6e-56)) {
tmp = y + x;
} else {
tmp = x + ((z * y) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.5e-103) or not (t <= 2.6e-56): tmp = y + x else: tmp = x + ((z * y) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.5e-103) || !(t <= 2.6e-56)) tmp = Float64(y + x); else tmp = Float64(x + Float64(Float64(z * y) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.5e-103) || ~((t <= 2.6e-56))) tmp = y + x; else tmp = x + ((z * y) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.5e-103], N[Not[LessEqual[t, 2.6e-56]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{-103} \lor \neg \left(t \leq 2.6 \cdot 10^{-56}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot y}{a}\\
\end{array}
\end{array}
if t < -1.5e-103 or 2.59999999999999997e-56 < t Initial program 83.7%
Taylor expanded in t around inf 73.8%
+-commutative73.8%
Simplified73.8%
if -1.5e-103 < t < 2.59999999999999997e-56Initial program 94.3%
Taylor expanded in t around 0 80.1%
Final simplification75.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.25e-104) (not (<= t 3.25e-49))) (+ y x) (+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.25e-104) || !(t <= 3.25e-49)) {
tmp = y + x;
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-2.25d-104)) .or. (.not. (t <= 3.25d-49))) then
tmp = y + x
else
tmp = x + (z * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.25e-104) || !(t <= 3.25e-49)) {
tmp = y + x;
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.25e-104) or not (t <= 3.25e-49): tmp = y + x else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.25e-104) || !(t <= 3.25e-49)) tmp = Float64(y + x); else tmp = Float64(x + Float64(z * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.25e-104) || ~((t <= 3.25e-49))) tmp = y + x; else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.25e-104], N[Not[LessEqual[t, 3.25e-49]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.25 \cdot 10^{-104} \lor \neg \left(t \leq 3.25 \cdot 10^{-49}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -2.2499999999999999e-104 or 3.24999999999999984e-49 < t Initial program 83.7%
Taylor expanded in t around inf 73.8%
+-commutative73.8%
Simplified73.8%
if -2.2499999999999999e-104 < t < 3.24999999999999984e-49Initial program 94.3%
Taylor expanded in t around 0 80.1%
+-commutative80.1%
associate-/l*83.7%
Simplified83.7%
associate-/r/83.0%
Applied egg-rr83.0%
Final simplification76.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.05e-103) (+ y x) (if (<= t 2.75e-52) (+ x (/ y (/ a z))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.05e-103) {
tmp = y + x;
} else if (t <= 2.75e-52) {
tmp = x + (y / (a / 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 <= (-2.05d-103)) then
tmp = y + x
else if (t <= 2.75d-52) then
tmp = x + (y / (a / 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 <= -2.05e-103) {
tmp = y + x;
} else if (t <= 2.75e-52) {
tmp = x + (y / (a / z));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.05e-103: tmp = y + x elif t <= 2.75e-52: tmp = x + (y / (a / z)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.05e-103) tmp = Float64(y + x); elseif (t <= 2.75e-52) tmp = Float64(x + Float64(y / Float64(a / z))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.05e-103) tmp = y + x; elseif (t <= 2.75e-52) tmp = x + (y / (a / z)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.05e-103], N[(y + x), $MachinePrecision], If[LessEqual[t, 2.75e-52], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.05 \cdot 10^{-103}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 2.75 \cdot 10^{-52}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -2.04999999999999998e-103 or 2.75e-52 < t Initial program 83.7%
Taylor expanded in t around inf 73.8%
+-commutative73.8%
Simplified73.8%
if -2.04999999999999998e-103 < t < 2.75e-52Initial program 94.3%
Taylor expanded in t around 0 80.1%
+-commutative80.1%
associate-/l*83.7%
Simplified83.7%
Final simplification77.2%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.7e-125) (+ y x) (if (<= t 4.4e-50) x (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.7e-125) {
tmp = y + x;
} else if (t <= 4.4e-50) {
tmp = x;
} 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 <= (-3.7d-125)) then
tmp = y + x
else if (t <= 4.4d-50) then
tmp = x
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 <= -3.7e-125) {
tmp = y + x;
} else if (t <= 4.4e-50) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.7e-125: tmp = y + x elif t <= 4.4e-50: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.7e-125) tmp = Float64(y + x); elseif (t <= 4.4e-50) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.7e-125) tmp = y + x; elseif (t <= 4.4e-50) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.7e-125], N[(y + x), $MachinePrecision], If[LessEqual[t, 4.4e-50], x, N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{-125}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{-50}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -3.6999999999999999e-125 or 4.3999999999999998e-50 < t Initial program 83.6%
Taylor expanded in t around inf 72.8%
+-commutative72.8%
Simplified72.8%
if -3.6999999999999999e-125 < t < 4.3999999999999998e-50Initial program 95.1%
Taylor expanded in x around inf 51.8%
Final simplification66.1%
(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 87.3%
Taylor expanded in x around inf 54.0%
Final simplification54.0%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- a t) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - 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 / ((a - t) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((a - t) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((a - t) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{a - t}{z - t}}
\end{array}
herbie shell --seed 2023293
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))