
(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 (fma y (/ (- z t) (- a t)) x))
double code(double x, double y, double z, double t, double a) {
return fma(y, ((z - t) / (a - t)), x);
}
function code(x, y, z, t, a) return fma(y, Float64(Float64(z - t) / Float64(a - t)), x) end
code[x_, y_, z_, t_, a_] := N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)
\end{array}
Initial program 98.4%
+-commutative98.4%
fma-def98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.8e+46)
(+ y x)
(if (<= t 7.5e-82)
(+ x (/ z (/ a y)))
(if (<= t 1.5e+145) (+ x (/ z (/ (- t) y))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.8e+46) {
tmp = y + x;
} else if (t <= 7.5e-82) {
tmp = x + (z / (a / y));
} else if (t <= 1.5e+145) {
tmp = x + (z / (-t / y));
} 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.8d+46)) then
tmp = y + x
else if (t <= 7.5d-82) then
tmp = x + (z / (a / y))
else if (t <= 1.5d+145) then
tmp = x + (z / (-t / y))
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.8e+46) {
tmp = y + x;
} else if (t <= 7.5e-82) {
tmp = x + (z / (a / y));
} else if (t <= 1.5e+145) {
tmp = x + (z / (-t / y));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.8e+46: tmp = y + x elif t <= 7.5e-82: tmp = x + (z / (a / y)) elif t <= 1.5e+145: tmp = x + (z / (-t / y)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.8e+46) tmp = Float64(y + x); elseif (t <= 7.5e-82) tmp = Float64(x + Float64(z / Float64(a / y))); elseif (t <= 1.5e+145) tmp = Float64(x + Float64(z / Float64(Float64(-t) / y))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.8e+46) tmp = y + x; elseif (t <= 7.5e-82) tmp = x + (z / (a / y)); elseif (t <= 1.5e+145) tmp = x + (z / (-t / y)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.8e+46], N[(y + x), $MachinePrecision], If[LessEqual[t, 7.5e-82], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e+145], N[(x + N[(z / N[((-t) / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+46}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-82}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+145}:\\
\;\;\;\;x + \frac{z}{\frac{-t}{y}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -2.80000000000000018e46 or 1.5000000000000001e145 < t Initial program 100.0%
Taylor expanded in t around inf 79.5%
+-commutative79.5%
Simplified79.5%
if -2.80000000000000018e46 < t < 7.4999999999999997e-82Initial program 96.9%
associate-*r/93.5%
Simplified93.5%
associate-/l*97.2%
associate-/r/94.6%
Applied egg-rr94.6%
Taylor expanded in z around inf 83.2%
associate-*l/87.1%
*-commutative87.1%
Simplified87.1%
clear-num87.0%
div-inv87.4%
Applied egg-rr87.4%
Taylor expanded in a around inf 78.1%
if 7.4999999999999997e-82 < t < 1.5000000000000001e145Initial program 99.8%
associate-*r/90.0%
Simplified90.0%
associate-/l*99.9%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in z around inf 80.6%
associate-*l/84.7%
*-commutative84.7%
Simplified84.7%
clear-num84.6%
div-inv84.7%
Applied egg-rr84.7%
Taylor expanded in a around 0 76.6%
neg-mul-176.6%
distribute-neg-frac76.6%
Simplified76.6%
Final simplification78.3%
(FPCore (x y z t a)
:precision binary64
(if (<= t -4.4e+46)
(+ y x)
(if (<= t 7.8e-82)
(+ x (/ z (/ a y)))
(if (<= t 1.2e+145) (- x (* y (/ z t))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.4e+46) {
tmp = y + x;
} else if (t <= 7.8e-82) {
tmp = x + (z / (a / y));
} else if (t <= 1.2e+145) {
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 <= (-4.4d+46)) then
tmp = y + x
else if (t <= 7.8d-82) then
tmp = x + (z / (a / y))
else if (t <= 1.2d+145) 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 <= -4.4e+46) {
tmp = y + x;
} else if (t <= 7.8e-82) {
tmp = x + (z / (a / y));
} else if (t <= 1.2e+145) {
tmp = x - (y * (z / t));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.4e+46: tmp = y + x elif t <= 7.8e-82: tmp = x + (z / (a / y)) elif t <= 1.2e+145: tmp = x - (y * (z / t)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.4e+46) tmp = Float64(y + x); elseif (t <= 7.8e-82) tmp = Float64(x + Float64(z / Float64(a / y))); elseif (t <= 1.2e+145) tmp = Float64(x - Float64(y * 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 (t <= -4.4e+46) tmp = y + x; elseif (t <= 7.8e-82) tmp = x + (z / (a / y)); elseif (t <= 1.2e+145) tmp = x - (y * (z / t)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.4e+46], N[(y + x), $MachinePrecision], If[LessEqual[t, 7.8e-82], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e+145], N[(x - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.4 \cdot 10^{+46}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-82}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+145}:\\
\;\;\;\;x - y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -4.4000000000000001e46 or 1.19999999999999996e145 < t Initial program 100.0%
Taylor expanded in t around inf 79.5%
+-commutative79.5%
Simplified79.5%
if -4.4000000000000001e46 < t < 7.79999999999999947e-82Initial program 96.9%
associate-*r/93.5%
Simplified93.5%
associate-/l*97.2%
associate-/r/94.6%
Applied egg-rr94.6%
Taylor expanded in z around inf 83.2%
associate-*l/87.1%
*-commutative87.1%
Simplified87.1%
clear-num87.0%
div-inv87.4%
Applied egg-rr87.4%
Taylor expanded in a around inf 78.1%
if 7.79999999999999947e-82 < t < 1.19999999999999996e145Initial program 99.8%
Taylor expanded in a around 0 70.0%
mul-1-neg70.0%
unsub-neg70.0%
associate-/l*76.0%
Simplified76.0%
Taylor expanded in t around 0 72.0%
associate-*r/75.9%
Simplified75.9%
Final simplification78.1%
(FPCore (x y z t a)
:precision binary64
(if (<= t -4.5e+42)
(+ y x)
(if (<= t 4.8e-84)
(+ x (/ z (/ a y)))
(if (<= t 1.2e+145) (- x (/ y (/ t z))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.5e+42) {
tmp = y + x;
} else if (t <= 4.8e-84) {
tmp = x + (z / (a / y));
} else if (t <= 1.2e+145) {
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 <= (-4.5d+42)) then
tmp = y + x
else if (t <= 4.8d-84) then
tmp = x + (z / (a / y))
else if (t <= 1.2d+145) 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 <= -4.5e+42) {
tmp = y + x;
} else if (t <= 4.8e-84) {
tmp = x + (z / (a / y));
} else if (t <= 1.2e+145) {
tmp = x - (y / (t / z));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.5e+42: tmp = y + x elif t <= 4.8e-84: tmp = x + (z / (a / y)) elif t <= 1.2e+145: tmp = x - (y / (t / z)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.5e+42) tmp = Float64(y + x); elseif (t <= 4.8e-84) tmp = Float64(x + Float64(z / Float64(a / y))); elseif (t <= 1.2e+145) 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 <= -4.5e+42) tmp = y + x; elseif (t <= 4.8e-84) tmp = x + (z / (a / y)); elseif (t <= 1.2e+145) tmp = x - (y / (t / z)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.5e+42], N[(y + x), $MachinePrecision], If[LessEqual[t, 4.8e-84], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e+145], N[(x - N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+42}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-84}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+145}:\\
\;\;\;\;x - \frac{y}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -4.50000000000000012e42 or 1.19999999999999996e145 < t Initial program 100.0%
Taylor expanded in t around inf 79.5%
+-commutative79.5%
Simplified79.5%
if -4.50000000000000012e42 < t < 4.80000000000000035e-84Initial program 96.9%
associate-*r/93.5%
Simplified93.5%
associate-/l*97.2%
associate-/r/94.6%
Applied egg-rr94.6%
Taylor expanded in z around inf 83.2%
associate-*l/87.1%
*-commutative87.1%
Simplified87.1%
clear-num87.0%
div-inv87.4%
Applied egg-rr87.4%
Taylor expanded in a around inf 78.1%
if 4.80000000000000035e-84 < t < 1.19999999999999996e145Initial program 99.8%
Taylor expanded in z around inf 80.6%
Taylor expanded in a around 0 72.0%
mul-1-neg72.0%
unsub-neg72.0%
associate-/l*76.0%
Simplified76.0%
Final simplification78.1%
(FPCore (x y z t a)
:precision binary64
(if (<= t -3.2e+45)
(+ y x)
(if (<= t 1.25e-81)
(+ x (/ z (/ a y)))
(if (<= t 1.85e+145) (- x (* z (/ y t))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.2e+45) {
tmp = y + x;
} else if (t <= 1.25e-81) {
tmp = x + (z / (a / y));
} else if (t <= 1.85e+145) {
tmp = x - (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 (t <= (-3.2d+45)) then
tmp = y + x
else if (t <= 1.25d-81) then
tmp = x + (z / (a / y))
else if (t <= 1.85d+145) then
tmp = x - (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 (t <= -3.2e+45) {
tmp = y + x;
} else if (t <= 1.25e-81) {
tmp = x + (z / (a / y));
} else if (t <= 1.85e+145) {
tmp = x - (z * (y / t));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.2e+45: tmp = y + x elif t <= 1.25e-81: tmp = x + (z / (a / y)) elif t <= 1.85e+145: tmp = x - (z * (y / t)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.2e+45) tmp = Float64(y + x); elseif (t <= 1.25e-81) tmp = Float64(x + Float64(z / Float64(a / y))); elseif (t <= 1.85e+145) tmp = Float64(x - Float64(z * 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 (t <= -3.2e+45) tmp = y + x; elseif (t <= 1.25e-81) tmp = x + (z / (a / y)); elseif (t <= 1.85e+145) tmp = x - (z * (y / t)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.2e+45], N[(y + x), $MachinePrecision], If[LessEqual[t, 1.25e-81], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.85e+145], N[(x - N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{+45}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-81}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+145}:\\
\;\;\;\;x - z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if t < -3.2000000000000003e45 or 1.84999999999999997e145 < t Initial program 100.0%
Taylor expanded in t around inf 79.5%
+-commutative79.5%
Simplified79.5%
if -3.2000000000000003e45 < t < 1.24999999999999995e-81Initial program 96.9%
associate-*r/93.5%
Simplified93.5%
associate-/l*97.2%
associate-/r/94.6%
Applied egg-rr94.6%
Taylor expanded in z around inf 83.2%
associate-*l/87.1%
*-commutative87.1%
Simplified87.1%
clear-num87.0%
div-inv87.4%
Applied egg-rr87.4%
Taylor expanded in a around inf 78.1%
if 1.24999999999999995e-81 < t < 1.84999999999999997e145Initial program 99.8%
associate-*r/90.0%
Simplified90.0%
associate-/l*99.9%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in z around inf 80.6%
associate-*l/84.7%
*-commutative84.7%
Simplified84.7%
Taylor expanded in a around 0 76.6%
associate-*r/76.6%
neg-mul-176.6%
Simplified76.6%
Final simplification78.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.8e+80) (not (<= t 1.02e+155))) (+ y x) (+ x (* y (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.8e+80) || !(t <= 1.02e+155)) {
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 <= (-1.8d+80)) .or. (.not. (t <= 1.02d+155))) 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 <= -1.8e+80) || !(t <= 1.02e+155)) {
tmp = y + x;
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.8e+80) or not (t <= 1.02e+155): tmp = y + x else: tmp = x + (y * (z / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.8e+80) || !(t <= 1.02e+155)) 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 <= -1.8e+80) || ~((t <= 1.02e+155))) 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, -1.8e+80], N[Not[LessEqual[t, 1.02e+155]], $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 -1.8 \cdot 10^{+80} \lor \neg \left(t \leq 1.02 \cdot 10^{+155}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if t < -1.79999999999999997e80 or 1.02e155 < t Initial program 100.0%
Taylor expanded in t around inf 83.7%
+-commutative83.7%
Simplified83.7%
if -1.79999999999999997e80 < t < 1.02e155Initial program 97.8%
Taylor expanded in z around inf 85.3%
Final simplification84.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.15e+80) (not (<= t 3e+145))) (+ y x) (+ x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.15e+80) || !(t <= 3e+145)) {
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.15d+80)) .or. (.not. (t <= 3d+145))) 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.15e+80) || !(t <= 3e+145)) {
tmp = y + x;
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.15e+80) or not (t <= 3e+145): 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.15e+80) || !(t <= 3e+145)) 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.15e+80) || ~((t <= 3e+145))) 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.15e+80], N[Not[LessEqual[t, 3e+145]], $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.15 \cdot 10^{+80} \lor \neg \left(t \leq 3 \cdot 10^{+145}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if t < -2.15000000000000002e80 or 3.0000000000000002e145 < t Initial program 100.0%
Taylor expanded in t around inf 83.0%
+-commutative83.0%
Simplified83.0%
if -2.15000000000000002e80 < t < 3.0000000000000002e145Initial program 97.8%
associate-*r/91.8%
Simplified91.8%
associate-/l*98.0%
associate-/r/96.2%
Applied egg-rr96.2%
Taylor expanded in z around inf 82.2%
associate-*l/86.5%
*-commutative86.5%
Simplified86.5%
Final simplification85.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2e+80) (not (<= t 1.22e+145))) (+ y x) (+ x (/ z (/ (- a t) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2e+80) || !(t <= 1.22e+145)) {
tmp = y + x;
} else {
tmp = x + (z / ((a - t) / y));
}
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+80)) .or. (.not. (t <= 1.22d+145))) then
tmp = y + x
else
tmp = x + (z / ((a - t) / y))
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+80) || !(t <= 1.22e+145)) {
tmp = y + x;
} else {
tmp = x + (z / ((a - t) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2e+80) or not (t <= 1.22e+145): tmp = y + x else: tmp = x + (z / ((a - t) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2e+80) || !(t <= 1.22e+145)) tmp = Float64(y + x); else tmp = Float64(x + Float64(z / Float64(Float64(a - t) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2e+80) || ~((t <= 1.22e+145))) tmp = y + x; else tmp = x + (z / ((a - t) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2e+80], N[Not[LessEqual[t, 1.22e+145]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(z / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+80} \lor \neg \left(t \leq 1.22 \cdot 10^{+145}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{a - t}{y}}\\
\end{array}
\end{array}
if t < -2e80 or 1.21999999999999994e145 < t Initial program 100.0%
Taylor expanded in t around inf 83.0%
+-commutative83.0%
Simplified83.0%
if -2e80 < t < 1.21999999999999994e145Initial program 97.8%
associate-*r/91.8%
Simplified91.8%
associate-/l*98.0%
associate-/r/96.2%
Applied egg-rr96.2%
Taylor expanded in z around inf 82.2%
associate-*l/86.5%
*-commutative86.5%
Simplified86.5%
clear-num86.4%
div-inv86.7%
Applied egg-rr86.7%
Final simplification85.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ y (- a t))))
(if (<= z -6.6e-78)
(+ x (* z t_1))
(if (<= z 9.5e+112) (- x (* t t_1)) (+ x (* y (/ z (- a t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y / (a - t);
double tmp;
if (z <= -6.6e-78) {
tmp = x + (z * t_1);
} else if (z <= 9.5e+112) {
tmp = x - (t * t_1);
} 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) :: t_1
real(8) :: tmp
t_1 = y / (a - t)
if (z <= (-6.6d-78)) then
tmp = x + (z * t_1)
else if (z <= 9.5d+112) then
tmp = x - (t * t_1)
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 t_1 = y / (a - t);
double tmp;
if (z <= -6.6e-78) {
tmp = x + (z * t_1);
} else if (z <= 9.5e+112) {
tmp = x - (t * t_1);
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y / (a - t) tmp = 0 if z <= -6.6e-78: tmp = x + (z * t_1) elif z <= 9.5e+112: tmp = x - (t * t_1) else: tmp = x + (y * (z / (a - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(y / Float64(a - t)) tmp = 0.0 if (z <= -6.6e-78) tmp = Float64(x + Float64(z * t_1)); elseif (z <= 9.5e+112) tmp = Float64(x - Float64(t * t_1)); else tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y / (a - t); tmp = 0.0; if (z <= -6.6e-78) tmp = x + (z * t_1); elseif (z <= 9.5e+112) tmp = x - (t * t_1); else tmp = x + (y * (z / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.6e-78], N[(x + N[(z * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+112], N[(x - N[(t * t$95$1), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a - t}\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{-78}:\\
\;\;\;\;x + z \cdot t\_1\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+112}:\\
\;\;\;\;x - t \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if z < -6.59999999999999963e-78Initial program 96.0%
associate-*r/83.3%
Simplified83.3%
associate-/l*96.5%
associate-/r/98.7%
Applied egg-rr98.7%
Taylor expanded in z around inf 78.8%
associate-*l/86.3%
*-commutative86.3%
Simplified86.3%
if -6.59999999999999963e-78 < z < 9.5000000000000008e112Initial program 99.9%
Taylor expanded in z around 0 79.6%
mul-1-neg79.6%
unsub-neg79.6%
*-commutative79.6%
associate-/l*92.1%
Simplified92.1%
associate-/r/88.2%
Applied egg-rr88.2%
if 9.5000000000000008e112 < z Initial program 97.9%
Taylor expanded in z around inf 97.9%
Final simplification89.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -260.0) (+ x (* z (/ y (- a t)))) (if (<= z 1.1e+113) (- x (/ y (/ (- a t) t))) (+ x (* y (/ z (- a t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -260.0) {
tmp = x + (z * (y / (a - t)));
} else if (z <= 1.1e+113) {
tmp = x - (y / ((a - t) / t));
} 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 (z <= (-260.0d0)) then
tmp = x + (z * (y / (a - t)))
else if (z <= 1.1d+113) then
tmp = x - (y / ((a - t) / t))
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 (z <= -260.0) {
tmp = x + (z * (y / (a - t)));
} else if (z <= 1.1e+113) {
tmp = x - (y / ((a - t) / t));
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -260.0: tmp = x + (z * (y / (a - t))) elif z <= 1.1e+113: tmp = x - (y / ((a - t) / t)) else: tmp = x + (y * (z / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -260.0) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); elseif (z <= 1.1e+113) tmp = Float64(x - Float64(y / Float64(Float64(a - t) / t))); 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 (z <= -260.0) tmp = x + (z * (y / (a - t))); elseif (z <= 1.1e+113) tmp = x - (y / ((a - t) / t)); else tmp = x + (y * (z / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -260.0], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e+113], N[(x - N[(y / N[(N[(a - t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -260:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+113}:\\
\;\;\;\;x - \frac{y}{\frac{a - t}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if z < -260Initial program 94.5%
associate-*r/82.6%
Simplified82.6%
associate-/l*95.3%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in z around inf 81.4%
associate-*l/91.7%
*-commutative91.7%
Simplified91.7%
if -260 < z < 1.10000000000000005e113Initial program 99.9%
Taylor expanded in z around 0 77.3%
mul-1-neg77.3%
unsub-neg77.3%
*-commutative77.3%
associate-/l*90.0%
Simplified90.0%
if 1.10000000000000005e113 < z Initial program 97.9%
Taylor expanded in z around inf 97.9%
Final simplification91.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.6e+45) (not (<= t 1.75e+46))) (+ y x) (+ x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.6e+45) || !(t <= 1.75e+46)) {
tmp = y + x;
} else {
tmp = x + (y * (z / 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 <= (-3.6d+45)) .or. (.not. (t <= 1.75d+46))) then
tmp = y + x
else
tmp = x + (y * (z / 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 <= -3.6e+45) || !(t <= 1.75e+46)) {
tmp = y + x;
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.6e+45) or not (t <= 1.75e+46): tmp = y + x else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.6e+45) || !(t <= 1.75e+46)) tmp = Float64(y + x); else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.6e+45) || ~((t <= 1.75e+46))) tmp = y + x; else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.6e+45], N[Not[LessEqual[t, 1.75e+46]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{+45} \lor \neg \left(t \leq 1.75 \cdot 10^{+46}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -3.6e45 or 1.74999999999999992e46 < t Initial program 99.9%
Taylor expanded in t around inf 74.9%
+-commutative74.9%
Simplified74.9%
if -3.6e45 < t < 1.74999999999999992e46Initial program 97.4%
Taylor expanded in t around 0 74.6%
Final simplification74.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -6.5e+43) (not (<= t 3.8e+32))) (+ y x) (+ x (/ z (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.5e+43) || !(t <= 3.8e+32)) {
tmp = y + x;
} else {
tmp = x + (z / (a / y));
}
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+43)) .or. (.not. (t <= 3.8d+32))) then
tmp = y + x
else
tmp = x + (z / (a / y))
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+43) || !(t <= 3.8e+32)) {
tmp = y + x;
} else {
tmp = x + (z / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -6.5e+43) or not (t <= 3.8e+32): tmp = y + x else: tmp = x + (z / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -6.5e+43) || !(t <= 3.8e+32)) tmp = Float64(y + x); else tmp = Float64(x + Float64(z / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -6.5e+43) || ~((t <= 3.8e+32))) tmp = y + x; else tmp = x + (z / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.5e+43], N[Not[LessEqual[t, 3.8e+32]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+43} \lor \neg \left(t \leq 3.8 \cdot 10^{+32}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if t < -6.4999999999999998e43 or 3.8000000000000003e32 < t Initial program 99.9%
Taylor expanded in t around inf 74.9%
+-commutative74.9%
Simplified74.9%
if -6.4999999999999998e43 < t < 3.8000000000000003e32Initial program 97.4%
associate-*r/94.5%
Simplified94.5%
associate-/l*97.6%
associate-/r/95.5%
Applied egg-rr95.5%
Taylor expanded in z around inf 84.0%
associate-*l/87.3%
*-commutative87.3%
Simplified87.3%
clear-num87.2%
div-inv87.6%
Applied egg-rr87.6%
Taylor expanded in a around inf 75.3%
Final simplification75.1%
(FPCore (x y z t a) :precision binary64 (if (<= a -3e+131) x (if (<= a 1.8e+130) (+ y x) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3e+131) {
tmp = x;
} else if (a <= 1.8e+130) {
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 (a <= (-3d+131)) then
tmp = x
else if (a <= 1.8d+130) 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 (a <= -3e+131) {
tmp = x;
} else if (a <= 1.8e+130) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3e+131: tmp = x elif a <= 1.8e+130: tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3e+131) tmp = x; elseif (a <= 1.8e+130) tmp = Float64(y + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3e+131) tmp = x; elseif (a <= 1.8e+130) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3e+131], x, If[LessEqual[a, 1.8e+130], N[(y + x), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{+131}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{+130}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.0000000000000001e131 or 1.8000000000000001e130 < a Initial program 99.9%
Taylor expanded in x around inf 66.9%
if -3.0000000000000001e131 < a < 1.8000000000000001e130Initial program 97.7%
Taylor expanded in t around inf 60.1%
+-commutative60.1%
Simplified60.1%
Final simplification62.1%
(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.4%
Final simplification98.4%
(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.4%
Taylor expanded in x around inf 51.1%
Final simplification51.1%
(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 2024036
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(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)))))