
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
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 - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
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 - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.3e+103)
(+ t (* (- y a) (/ (- x t) z)))
(if (<= z 1.45e+136)
(fma (- t x) (/ (- y z) (- a z)) x)
(fma (- x t) (/ (- y a) z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.3e+103) {
tmp = t + ((y - a) * ((x - t) / z));
} else if (z <= 1.45e+136) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else {
tmp = fma((x - t), ((y - a) / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.3e+103) tmp = Float64(t + Float64(Float64(y - a) * Float64(Float64(x - t) / z))); elseif (z <= 1.45e+136) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); else tmp = fma(Float64(x - t), Float64(Float64(y - a) / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.3e+103], N[(t + N[(N[(y - a), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e+136], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(x - t), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+103}:\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x - t}{z}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+136}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\
\end{array}
\end{array}
if z < -3.30000000000000009e103Initial program 28.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6463.9
Applied rewrites63.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6490.2
Applied rewrites90.2%
if -3.30000000000000009e103 < z < 1.44999999999999987e136Initial program 88.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6492.8
Applied rewrites92.8%
if 1.44999999999999987e136 < z Initial program 28.1%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites85.0%
Final simplification91.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.5e+102)
(+ t (* (- y a) (/ (- x t) z)))
(if (<= z -6.3e-117)
(+ x (/ (* t (- y z)) (- a z)))
(if (<= z 1.42e+135)
(fma (- y z) (/ (- t x) a) x)
(fma (- x t) (/ (- y a) z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.5e+102) {
tmp = t + ((y - a) * ((x - t) / z));
} else if (z <= -6.3e-117) {
tmp = x + ((t * (y - z)) / (a - z));
} else if (z <= 1.42e+135) {
tmp = fma((y - z), ((t - x) / a), x);
} else {
tmp = fma((x - t), ((y - a) / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.5e+102) tmp = Float64(t + Float64(Float64(y - a) * Float64(Float64(x - t) / z))); elseif (z <= -6.3e-117) tmp = Float64(x + Float64(Float64(t * Float64(y - z)) / Float64(a - z))); elseif (z <= 1.42e+135) tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); else tmp = fma(Float64(x - t), Float64(Float64(y - a) / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.5e+102], N[(t + N[(N[(y - a), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.3e-117], N[(x + N[(N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.42e+135], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(x - t), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+102}:\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x - t}{z}\\
\mathbf{elif}\;z \leq -6.3 \cdot 10^{-117}:\\
\;\;\;\;x + \frac{t \cdot \left(y - z\right)}{a - z}\\
\mathbf{elif}\;z \leq 1.42 \cdot 10^{+135}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\
\end{array}
\end{array}
if z < -1.4999999999999999e102Initial program 28.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6463.9
Applied rewrites63.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6490.2
Applied rewrites90.2%
if -1.4999999999999999e102 < z < -6.2999999999999997e-117Initial program 82.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6474.2
Applied rewrites74.2%
if -6.2999999999999997e-117 < z < 1.41999999999999998e135Initial program 90.6%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6481.6
Applied rewrites81.6%
if 1.41999999999999998e135 < z Initial program 28.1%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites85.0%
Final simplification82.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.7e+84)
(+ t (* (- y a) (/ (- x t) z)))
(if (<= z 1.42e+135)
(fma (- y z) (/ (- t x) a) x)
(fma (- x t) (/ (- y a) z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.7e+84) {
tmp = t + ((y - a) * ((x - t) / z));
} else if (z <= 1.42e+135) {
tmp = fma((y - z), ((t - x) / a), x);
} else {
tmp = fma((x - t), ((y - a) / z), t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.7e+84) tmp = Float64(t + Float64(Float64(y - a) * Float64(Float64(x - t) / z))); elseif (z <= 1.42e+135) tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); else tmp = fma(Float64(x - t), Float64(Float64(y - a) / z), t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.7e+84], N[(t + N[(N[(y - a), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.42e+135], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(x - t), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+84}:\\
\;\;\;\;t + \left(y - a\right) \cdot \frac{x - t}{z}\\
\mathbf{elif}\;z \leq 1.42 \cdot 10^{+135}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\
\end{array}
\end{array}
if z < -1.6999999999999999e84Initial program 28.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6462.8
Applied rewrites62.8%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6486.6
Applied rewrites86.6%
if -1.6999999999999999e84 < z < 1.41999999999999998e135Initial program 89.8%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6477.3
Applied rewrites77.3%
if 1.41999999999999998e135 < z Initial program 28.1%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites85.0%
Final simplification80.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x t) (/ (- y a) z) t)))
(if (<= z -8e+99)
t_1
(if (<= z 1.42e+135) (fma (- y z) (/ (- t x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - t), ((y - a) / z), t);
double tmp;
if (z <= -8e+99) {
tmp = t_1;
} else if (z <= 1.42e+135) {
tmp = fma((y - z), ((t - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - t), Float64(Float64(y - a) / z), t) tmp = 0.0 if (z <= -8e+99) tmp = t_1; elseif (z <= 1.42e+135) tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -8e+99], t$95$1, If[LessEqual[z, 1.42e+135], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\
\mathbf{if}\;z \leq -8 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.42 \cdot 10^{+135}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.9999999999999997e99 or 1.41999999999999998e135 < z Initial program 28.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites86.4%
if -7.9999999999999997e99 < z < 1.41999999999999998e135Initial program 88.4%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6476.7
Applied rewrites76.7%
Final simplification79.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma y (/ (- x t) z) t)))
(if (<= z -8e+99)
t_1
(if (<= z 1.42e+135) (fma (- y z) (/ (- t x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(y, ((x - t) / z), t);
double tmp;
if (z <= -8e+99) {
tmp = t_1;
} else if (z <= 1.42e+135) {
tmp = fma((y - z), ((t - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(y, Float64(Float64(x - t) / z), t) tmp = 0.0 if (z <= -8e+99) tmp = t_1; elseif (z <= 1.42e+135) tmp = fma(Float64(y - z), Float64(Float64(t - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -8e+99], t$95$1, If[LessEqual[z, 1.42e+135], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \frac{x - t}{z}, t\right)\\
\mathbf{if}\;z \leq -8 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.42 \cdot 10^{+135}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.9999999999999997e99 or 1.41999999999999998e135 < z Initial program 28.3%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6444.6
Applied rewrites44.6%
Taylor expanded in t around 0
Applied rewrites10.3%
Taylor expanded in z around inf
Applied rewrites77.0%
if -7.9999999999999997e99 < z < 1.41999999999999998e135Initial program 88.4%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6476.7
Applied rewrites76.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma y (/ (- x t) z) t))) (if (<= z -8e+99) t_1 (if (<= z 2.2e+28) (fma (- t x) (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(y, ((x - t) / z), t);
double tmp;
if (z <= -8e+99) {
tmp = t_1;
} else if (z <= 2.2e+28) {
tmp = fma((t - x), (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(y, Float64(Float64(x - t) / z), t) tmp = 0.0 if (z <= -8e+99) tmp = t_1; elseif (z <= 2.2e+28) tmp = fma(Float64(t - x), Float64(y / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -8e+99], t$95$1, If[LessEqual[z, 2.2e+28], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \frac{x - t}{z}, t\right)\\
\mathbf{if}\;z \leq -8 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+28}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.9999999999999997e99 or 2.19999999999999986e28 < z Initial program 37.2%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6443.5
Applied rewrites43.5%
Taylor expanded in t around 0
Applied rewrites10.4%
Taylor expanded in z around inf
Applied rewrites71.3%
if -7.9999999999999997e99 < z < 2.19999999999999986e28Initial program 89.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6492.9
Applied rewrites92.9%
Taylor expanded in z around 0
lower-/.f6472.7
Applied rewrites72.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma y (/ (- x t) z) t))) (if (<= z -8e+99) t_1 (if (<= z 2.2e+28) (fma y (/ (- t x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(y, ((x - t) / z), t);
double tmp;
if (z <= -8e+99) {
tmp = t_1;
} else if (z <= 2.2e+28) {
tmp = fma(y, ((t - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(y, Float64(Float64(x - t) / z), t) tmp = 0.0 if (z <= -8e+99) tmp = t_1; elseif (z <= 2.2e+28) tmp = fma(y, Float64(Float64(t - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -8e+99], t$95$1, If[LessEqual[z, 2.2e+28], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \frac{x - t}{z}, t\right)\\
\mathbf{if}\;z \leq -8 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+28}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.9999999999999997e99 or 2.19999999999999986e28 < z Initial program 37.2%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6443.5
Applied rewrites43.5%
Taylor expanded in t around 0
Applied rewrites10.4%
Taylor expanded in z around inf
Applied rewrites71.3%
if -7.9999999999999997e99 < z < 2.19999999999999986e28Initial program 89.9%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6472.0
Applied rewrites72.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma z (/ (- x t) a) x))) (if (<= a -2.9e+69) t_1 (if (<= a 4.35e+99) (fma y (/ (- x t) z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(z, ((x - t) / a), x);
double tmp;
if (a <= -2.9e+69) {
tmp = t_1;
} else if (a <= 4.35e+99) {
tmp = fma(y, ((x - t) / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(z, Float64(Float64(x - t) / a), x) tmp = 0.0 if (a <= -2.9e+69) tmp = t_1; elseif (a <= 4.35e+99) tmp = fma(y, Float64(Float64(x - t) / z), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(N[(x - t), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -2.9e+69], t$95$1, If[LessEqual[a, 4.35e+99], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, \frac{x - t}{a}, x\right)\\
\mathbf{if}\;a \leq -2.9 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.35 \cdot 10^{+99}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{x - t}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.8999999999999998e69 or 4.3499999999999998e99 < a Initial program 74.1%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
lower-+.f64N/A
lower-neg.f6472.7
Applied rewrites72.7%
Applied rewrites61.2%
Taylor expanded in z around 0
Applied rewrites69.5%
if -2.8999999999999998e69 < a < 4.3499999999999998e99Initial program 67.5%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6445.0
Applied rewrites45.0%
Taylor expanded in t around 0
Applied rewrites17.1%
Taylor expanded in z around inf
Applied rewrites61.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- x) (/ y a) x))) (if (<= a -2.55e+69) t_1 (if (<= a 0.00025) (fma y (/ (- x t) z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-x, (y / a), x);
double tmp;
if (a <= -2.55e+69) {
tmp = t_1;
} else if (a <= 0.00025) {
tmp = fma(y, ((x - t) / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(-x), Float64(y / a), x) tmp = 0.0 if (a <= -2.55e+69) tmp = t_1; elseif (a <= 0.00025) tmp = fma(y, Float64(Float64(x - t) / z), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-x) * N[(y / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -2.55e+69], t$95$1, If[LessEqual[a, 0.00025], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-x, \frac{y}{a}, x\right)\\
\mathbf{if}\;a \leq -2.55 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 0.00025:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{x - t}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.54999999999999999e69 or 2.5000000000000001e-4 < a Initial program 71.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6490.5
Applied rewrites90.5%
Taylor expanded in z around 0
lower-/.f6469.7
Applied rewrites69.7%
Taylor expanded in t around 0
mul-1-negN/A
lower-neg.f6455.8
Applied rewrites55.8%
if -2.54999999999999999e69 < a < 2.5000000000000001e-4Initial program 68.2%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6448.4
Applied rewrites48.4%
Taylor expanded in t around 0
Applied rewrites19.0%
Taylor expanded in z around inf
Applied rewrites65.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma y (/ x z) t))) (if (<= z -2.6e+81) t_1 (if (<= z 2.2e+28) (fma (- x) (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(y, (x / z), t);
double tmp;
if (z <= -2.6e+81) {
tmp = t_1;
} else if (z <= 2.2e+28) {
tmp = fma(-x, (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(y, Float64(x / z), t) tmp = 0.0 if (z <= -2.6e+81) tmp = t_1; elseif (z <= 2.2e+28) tmp = fma(Float64(-x), Float64(y / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(x / z), $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[z, -2.6e+81], t$95$1, If[LessEqual[z, 2.2e+28], N[((-x) * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \frac{x}{z}, t\right)\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+81}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+28}:\\
\;\;\;\;\mathsf{fma}\left(-x, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.59999999999999992e81 or 2.19999999999999986e28 < z Initial program 36.5%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6441.5
Applied rewrites41.5%
Taylor expanded in t around 0
Applied rewrites10.1%
Taylor expanded in z around inf
Applied rewrites69.0%
Taylor expanded in x around inf
Applied rewrites62.5%
if -2.59999999999999992e81 < z < 2.19999999999999986e28Initial program 92.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6493.9
Applied rewrites93.9%
Taylor expanded in z around 0
lower-/.f6473.7
Applied rewrites73.7%
Taylor expanded in t around 0
mul-1-negN/A
lower-neg.f6455.8
Applied rewrites55.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma x (/ z a) x))) (if (<= a -2.9e+69) t_1 (if (<= a 0.00026) (fma y (/ x z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(x, (z / a), x);
double tmp;
if (a <= -2.9e+69) {
tmp = t_1;
} else if (a <= 0.00026) {
tmp = fma(y, (x / z), t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(x, Float64(z / a), x) tmp = 0.0 if (a <= -2.9e+69) tmp = t_1; elseif (a <= 0.00026) tmp = fma(y, Float64(x / z), t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(z / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -2.9e+69], t$95$1, If[LessEqual[a, 0.00026], N[(y * N[(x / z), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x, \frac{z}{a}, x\right)\\
\mathbf{if}\;a \leq -2.9 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 0.00026:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{x}{z}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.8999999999999998e69 or 2.59999999999999977e-4 < a Initial program 71.9%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
lower-+.f64N/A
lower-neg.f6467.5
Applied rewrites67.5%
Applied rewrites57.8%
Taylor expanded in t around 0
Applied rewrites49.6%
Taylor expanded in z around 0
Applied rewrites49.0%
if -2.8999999999999998e69 < a < 2.59999999999999977e-4Initial program 68.2%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6448.4
Applied rewrites48.4%
Taylor expanded in t around 0
Applied rewrites19.0%
Taylor expanded in z around inf
Applied rewrites65.8%
Taylor expanded in x around inf
Applied rewrites54.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* x (/ y z)))) (if (<= x -3.8e+40) t_1 (if (<= x 1.75e-62) (+ x (- t x)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (y / z);
double tmp;
if (x <= -3.8e+40) {
tmp = t_1;
} else if (x <= 1.75e-62) {
tmp = x + (t - x);
} 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)
if (x <= (-3.8d+40)) then
tmp = t_1
else if (x <= 1.75d-62) then
tmp = x + (t - x)
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);
double tmp;
if (x <= -3.8e+40) {
tmp = t_1;
} else if (x <= 1.75e-62) {
tmp = x + (t - x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (y / z) tmp = 0 if x <= -3.8e+40: tmp = t_1 elif x <= 1.75e-62: tmp = x + (t - x) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(y / z)) tmp = 0.0 if (x <= -3.8e+40) tmp = t_1; elseif (x <= 1.75e-62) tmp = Float64(x + Float64(t - x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (y / z); tmp = 0.0; if (x <= -3.8e+40) tmp = t_1; elseif (x <= 1.75e-62) tmp = x + (t - x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.8e+40], t$95$1, If[LessEqual[x, 1.75e-62], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{z}\\
\mathbf{if}\;x \leq -3.8 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.75 \cdot 10^{-62}:\\
\;\;\;\;x + \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.80000000000000004e40 or 1.7500000000000001e-62 < x Initial program 61.6%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6429.9
Applied rewrites29.9%
Taylor expanded in x around -inf
Applied rewrites23.3%
Applied rewrites24.9%
if -3.80000000000000004e40 < x < 1.7500000000000001e-62Initial program 80.8%
Taylor expanded in z around inf
lower--.f6426.2
Applied rewrites26.2%
Final simplification25.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (/ x z)))) (if (<= x -3.8e+40) t_1 (if (<= x 1.75e-62) (+ x (- t x)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (x / z);
double tmp;
if (x <= -3.8e+40) {
tmp = t_1;
} else if (x <= 1.75e-62) {
tmp = x + (t - x);
} 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 = y * (x / z)
if (x <= (-3.8d+40)) then
tmp = t_1
else if (x <= 1.75d-62) then
tmp = x + (t - x)
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 = y * (x / z);
double tmp;
if (x <= -3.8e+40) {
tmp = t_1;
} else if (x <= 1.75e-62) {
tmp = x + (t - x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (x / z) tmp = 0 if x <= -3.8e+40: tmp = t_1 elif x <= 1.75e-62: tmp = x + (t - x) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(x / z)) tmp = 0.0 if (x <= -3.8e+40) tmp = t_1; elseif (x <= 1.75e-62) tmp = Float64(x + Float64(t - x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (x / z); tmp = 0.0; if (x <= -3.8e+40) tmp = t_1; elseif (x <= 1.75e-62) tmp = x + (t - x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.8e+40], t$95$1, If[LessEqual[x, 1.75e-62], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{z}\\
\mathbf{if}\;x \leq -3.8 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.75 \cdot 10^{-62}:\\
\;\;\;\;x + \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.80000000000000004e40 or 1.7500000000000001e-62 < x Initial program 61.6%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6429.9
Applied rewrites29.9%
Taylor expanded in x around -inf
Applied rewrites23.3%
Applied rewrites24.3%
if -3.80000000000000004e40 < x < 1.7500000000000001e-62Initial program 80.8%
Taylor expanded in z around inf
lower--.f6426.2
Applied rewrites26.2%
(FPCore (x y z t a) :precision binary64 (fma y (/ x z) t))
double code(double x, double y, double z, double t, double a) {
return fma(y, (x / z), t);
}
function code(x, y, z, t, a) return fma(y, Float64(x / z), t) end
code[x_, y_, z_, t_, a_] := N[(y * N[(x / z), $MachinePrecision] + t), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, \frac{x}{z}, t\right)
\end{array}
Initial program 69.9%
Taylor expanded in a around 0
+-commutativeN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-fracN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f6433.7
Applied rewrites33.7%
Taylor expanded in t around 0
Applied rewrites13.3%
Taylor expanded in z around inf
Applied rewrites44.4%
Taylor expanded in x around inf
Applied rewrites36.3%
(FPCore (x y z t a) :precision binary64 (+ x (- t x)))
double code(double x, double y, double z, double t, double a) {
return x + (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 = x + (t - x)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (t - x);
}
def code(x, y, z, t, a): return x + (t - x)
function code(x, y, z, t, a) return Float64(x + Float64(t - x)) end
function tmp = code(x, y, z, t, a) tmp = x + (t - x); end
code[x_, y_, z_, t_, a_] := N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(t - x\right)
\end{array}
Initial program 69.9%
Taylor expanded in z around inf
lower--.f6415.2
Applied rewrites15.2%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
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 = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 69.9%
Taylor expanded in y around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
lower-+.f64N/A
lower-neg.f6447.4
Applied rewrites47.4%
Applied rewrites40.3%
Taylor expanded in t around 0
Applied rewrites28.8%
Taylor expanded in z around inf
Applied rewrites2.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} 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 = t - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
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 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024233
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
(+ x (/ (* (- y z) (- t x)) (- a z))))