
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (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 - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (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 - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- z t) (/ (- y x) (- a t)) x))
(t_2 (+ (/ (* (- z t) (- y x)) (- a t)) x)))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -5e-167)
t_2
(if (<= t_2 0.0)
(fma (/ x t) (- z a) y)
(if (<= t_2 2e+269) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((z - t), ((y - x) / (a - t)), x);
double t_2 = (((z - t) * (y - x)) / (a - t)) + x;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -5e-167) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = fma((x / t), (z - a), y);
} else if (t_2 <= 2e+269) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(z - t), Float64(Float64(y - x) / Float64(a - t)), x) t_2 = Float64(Float64(Float64(Float64(z - t) * Float64(y - x)) / Float64(a - t)) + x) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -5e-167) tmp = t_2; elseif (t_2 <= 0.0) tmp = fma(Float64(x / t), Float64(z - a), y); elseif (t_2 <= 2e+269) tmp = t_2; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(z - t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -5e-167], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(x / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t$95$2, 2e+269], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)\\
t_2 := \frac{\left(z - t\right) \cdot \left(y - x\right)}{a - t} + x\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-167}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z - a, y\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+269}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0 or 2.0000000000000001e269 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 45.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6484.6
Applied rewrites84.6%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -5.0000000000000002e-167 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 2.0000000000000001e269Initial program 98.0%
if -5.0000000000000002e-167 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.5%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites99.9%
Taylor expanded in y around 0
Applied rewrites99.9%
Final simplification93.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.8e-106)
(fma (/ (- x y) t) (- z a) y)
(if (<= t 6.4e-105)
(fma (- y x) (/ z a) x)
(if (<= t 1.16e-28)
(fma (- x y) (/ z t) y)
(if (<= t 1.16e+123)
(fma (- x y) (/ t (- a t)) x)
(fma (/ x t) (- z a) y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.8e-106) {
tmp = fma(((x - y) / t), (z - a), y);
} else if (t <= 6.4e-105) {
tmp = fma((y - x), (z / a), x);
} else if (t <= 1.16e-28) {
tmp = fma((x - y), (z / t), y);
} else if (t <= 1.16e+123) {
tmp = fma((x - y), (t / (a - t)), x);
} else {
tmp = fma((x / t), (z - a), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.8e-106) tmp = fma(Float64(Float64(x - y) / t), Float64(z - a), y); elseif (t <= 6.4e-105) tmp = fma(Float64(y - x), Float64(z / a), x); elseif (t <= 1.16e-28) tmp = fma(Float64(x - y), Float64(z / t), y); elseif (t <= 1.16e+123) tmp = fma(Float64(x - y), Float64(t / Float64(a - t)), x); else tmp = fma(Float64(x / t), Float64(z - a), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.8e-106], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, 6.4e-105], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 1.16e-28], N[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, 1.16e+123], N[(N[(x - y), $MachinePrecision] * N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(x / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{-106}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\mathbf{elif}\;t \leq 6.4 \cdot 10^{-105}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
\mathbf{elif}\;t \leq 1.16 \cdot 10^{-28}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\mathbf{elif}\;t \leq 1.16 \cdot 10^{+123}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{t}{a - t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z - a, y\right)\\
\end{array}
\end{array}
if t < -2.79999999999999988e-106Initial program 61.2%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites78.7%
if -2.79999999999999988e-106 < t < 6.39999999999999962e-105Initial program 94.2%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6496.7
Applied rewrites96.7%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6484.5
Applied rewrites84.5%
Taylor expanded in t around 0
Applied rewrites81.8%
if 6.39999999999999962e-105 < t < 1.1600000000000001e-28Initial program 85.2%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites66.7%
Taylor expanded in a around 0
Applied rewrites62.8%
Applied rewrites70.7%
if 1.1600000000000001e-28 < t < 1.16e123Initial program 73.4%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6463.5
Applied rewrites63.5%
if 1.16e123 < t Initial program 40.4%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites96.8%
Taylor expanded in y around 0
Applied rewrites97.1%
(FPCore (x y z t a)
:precision binary64
(if (<= t -3e+80)
(fma (/ (- x y) t) (- z a) y)
(if (<= t 3.2e+137)
(+ (/ (- y x) (/ (- a t) (- z t))) x)
(fma (/ x t) (- z a) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3e+80) {
tmp = fma(((x - y) / t), (z - a), y);
} else if (t <= 3.2e+137) {
tmp = ((y - x) / ((a - t) / (z - t))) + x;
} else {
tmp = fma((x / t), (z - a), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3e+80) tmp = fma(Float64(Float64(x - y) / t), Float64(z - a), y); elseif (t <= 3.2e+137) tmp = Float64(Float64(Float64(y - x) / Float64(Float64(a - t) / Float64(z - t))) + x); else tmp = fma(Float64(x / t), Float64(z - a), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3e+80], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, 3.2e+137], N[(N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(x / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{+80}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+137}:\\
\;\;\;\;\frac{y - x}{\frac{a - t}{z - t}} + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z - a, y\right)\\
\end{array}
\end{array}
if t < -2.99999999999999987e80Initial program 42.9%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites88.6%
if -2.99999999999999987e80 < t < 3.20000000000000019e137Initial program 86.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6492.9
Applied rewrites92.9%
if 3.20000000000000019e137 < t Initial program 38.6%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites99.9%
Taylor expanded in y around 0
Applied rewrites99.9%
Final simplification92.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x y) (/ z t) y)))
(if (<= t -1.48e-180)
t_1
(if (<= t 4.3e-92)
(/ (* (- y x) z) a)
(if (<= t 1.65e+22) t_1 (fma (/ x t) (- z a) y))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), (z / t), y);
double tmp;
if (t <= -1.48e-180) {
tmp = t_1;
} else if (t <= 4.3e-92) {
tmp = ((y - x) * z) / a;
} else if (t <= 1.65e+22) {
tmp = t_1;
} else {
tmp = fma((x / t), (z - a), y);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(z / t), y) tmp = 0.0 if (t <= -1.48e-180) tmp = t_1; elseif (t <= 4.3e-92) tmp = Float64(Float64(Float64(y - x) * z) / a); elseif (t <= 1.65e+22) tmp = t_1; else tmp = fma(Float64(x / t), Float64(z - a), y); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.48e-180], t$95$1, If[LessEqual[t, 4.3e-92], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 1.65e+22], t$95$1, N[(N[(x / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\mathbf{if}\;t \leq -1.48 \cdot 10^{-180}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{-92}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z - a, y\right)\\
\end{array}
\end{array}
if t < -1.47999999999999994e-180 or 4.30000000000000014e-92 < t < 1.6499999999999999e22Initial program 71.8%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites67.7%
Taylor expanded in a around 0
Applied rewrites63.4%
Applied rewrites64.8%
if -1.47999999999999994e-180 < t < 4.30000000000000014e-92Initial program 91.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6494.7
Applied rewrites94.7%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6483.3
Applied rewrites83.3%
Taylor expanded in z around inf
Applied rewrites53.2%
if 1.6499999999999999e22 < t Initial program 48.6%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites74.3%
Taylor expanded in y around 0
Applied rewrites74.6%
Final simplification63.8%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.65e+69)
(fma (/ (- x y) t) (- z a) y)
(if (<= t 2.7e+137)
(fma (- z t) (/ (- y x) (- a t)) x)
(fma (/ x t) (- z a) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.65e+69) {
tmp = fma(((x - y) / t), (z - a), y);
} else if (t <= 2.7e+137) {
tmp = fma((z - t), ((y - x) / (a - t)), x);
} else {
tmp = fma((x / t), (z - a), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.65e+69) tmp = fma(Float64(Float64(x - y) / t), Float64(z - a), y); elseif (t <= 2.7e+137) tmp = fma(Float64(z - t), Float64(Float64(y - x) / Float64(a - t)), x); else tmp = fma(Float64(x / t), Float64(z - a), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.65e+69], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, 2.7e+137], N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(x / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{+69}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+137}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y - x}{a - t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z - a, y\right)\\
\end{array}
\end{array}
if t < -1.6499999999999999e69Initial program 43.3%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites87.2%
if -1.6499999999999999e69 < t < 2.70000000000000017e137Initial program 86.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6488.7
Applied rewrites88.7%
if 2.70000000000000017e137 < t Initial program 38.6%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites99.9%
Taylor expanded in y around 0
Applied rewrites99.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.65e-205)
(fma (/ x t) z y)
(if (<= z 9.2e+24)
(fma a (/ (- x) t) y)
(if (<= z 1.7e+287) (* (/ (- x y) t) z) (/ (* z y) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.65e-205) {
tmp = fma((x / t), z, y);
} else if (z <= 9.2e+24) {
tmp = fma(a, (-x / t), y);
} else if (z <= 1.7e+287) {
tmp = ((x - y) / t) * z;
} else {
tmp = (z * y) / a;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.65e-205) tmp = fma(Float64(x / t), z, y); elseif (z <= 9.2e+24) tmp = fma(a, Float64(Float64(-x) / t), y); elseif (z <= 1.7e+287) tmp = Float64(Float64(Float64(x - y) / t) * z); else tmp = Float64(Float64(z * y) / a); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.65e-205], N[(N[(x / t), $MachinePrecision] * z + y), $MachinePrecision], If[LessEqual[z, 9.2e+24], N[(a * N[((-x) / t), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[z, 1.7e+287], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z), $MachinePrecision], N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.65 \cdot 10^{-205}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z, y\right)\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+24}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{-x}{t}, y\right)\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+287}:\\
\;\;\;\;\frac{x - y}{t} \cdot z\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\end{array}
\end{array}
if z < -3.64999999999999996e-205Initial program 72.3%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites60.7%
Taylor expanded in a around 0
Applied rewrites59.7%
Taylor expanded in y around 0
Applied rewrites49.0%
if -3.64999999999999996e-205 < z < 9.1999999999999996e24Initial program 73.5%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites54.5%
Taylor expanded in t around 0
Applied rewrites18.1%
Taylor expanded in z around 0
Applied rewrites50.4%
Taylor expanded in y around 0
Applied rewrites51.8%
if 9.1999999999999996e24 < z < 1.70000000000000016e287Initial program 68.4%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites60.8%
Taylor expanded in t around 0
Applied rewrites56.0%
Taylor expanded in z around inf
Applied rewrites56.7%
if 1.70000000000000016e287 < z Initial program 87.7%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6444.4
Applied rewrites44.4%
Taylor expanded in t around 0
Applied rewrites75.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.7e-55)
(fma (/ (- x y) t) (- z a) y)
(if (<= t 1.35e+123)
(+ (/ (* (- y x) z) (- a t)) x)
(fma (/ x t) (- z a) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.7e-55) {
tmp = fma(((x - y) / t), (z - a), y);
} else if (t <= 1.35e+123) {
tmp = (((y - x) * z) / (a - t)) + x;
} else {
tmp = fma((x / t), (z - a), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.7e-55) tmp = fma(Float64(Float64(x - y) / t), Float64(z - a), y); elseif (t <= 1.35e+123) tmp = Float64(Float64(Float64(Float64(y - x) * z) / Float64(a - t)) + x); else tmp = fma(Float64(x / t), Float64(z - a), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.7e-55], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, 1.35e+123], N[(N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(x / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.7 \cdot 10^{-55}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+123}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a - t} + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z - a, y\right)\\
\end{array}
\end{array}
if t < -1.69999999999999986e-55Initial program 55.5%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites82.4%
if -1.69999999999999986e-55 < t < 1.35000000000000007e123Initial program 87.9%
Taylor expanded in t around 0
lower-*.f64N/A
lower--.f6476.8
Applied rewrites76.8%
if 1.35000000000000007e123 < t Initial program 40.4%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites96.8%
Taylor expanded in y around 0
Applied rewrites97.1%
Final simplification81.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- z t) a) (- y x) x)))
(if (<= a -2800000000.0)
t_1
(if (<= a 1.35e+103) (fma (/ (- x y) t) (- z a) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((z - t) / a), (y - x), x);
double tmp;
if (a <= -2800000000.0) {
tmp = t_1;
} else if (a <= 1.35e+103) {
tmp = fma(((x - y) / t), (z - a), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(z - t) / a), Float64(y - x), x) tmp = 0.0 if (a <= -2800000000.0) tmp = t_1; elseif (a <= 1.35e+103) tmp = fma(Float64(Float64(x - y) / t), Float64(z - a), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -2800000000.0], t$95$1, If[LessEqual[a, 1.35e+103], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{z - t}{a}, y - x, x\right)\\
\mathbf{if}\;a \leq -2800000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{+103}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.8e9 or 1.34999999999999996e103 < a Initial program 75.6%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6479.8
Applied rewrites79.8%
if -2.8e9 < a < 1.34999999999999996e103Initial program 70.1%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites78.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ z t) x)))
(if (<= z -3.8e+87)
t_1
(if (<= z 9.2e+24)
(fma a (/ y t) y)
(if (<= z 1.15e+287) t_1 (/ (* z y) a))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z / t) * x;
double tmp;
if (z <= -3.8e+87) {
tmp = t_1;
} else if (z <= 9.2e+24) {
tmp = fma(a, (y / t), y);
} else if (z <= 1.15e+287) {
tmp = t_1;
} else {
tmp = (z * y) / a;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z / t) * x) tmp = 0.0 if (z <= -3.8e+87) tmp = t_1; elseif (z <= 9.2e+24) tmp = fma(a, Float64(y / t), y); elseif (z <= 1.15e+287) tmp = t_1; else tmp = Float64(Float64(z * y) / a); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / t), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -3.8e+87], t$95$1, If[LessEqual[z, 9.2e+24], N[(a * N[(y / t), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[z, 1.15e+287], t$95$1, N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{t} \cdot x\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+24}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{y}{t}, y\right)\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+287}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\end{array}
\end{array}
if z < -3.80000000000000011e87 or 9.1999999999999996e24 < z < 1.15000000000000007e287Initial program 68.0%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites65.1%
Taylor expanded in t around 0
Applied rewrites55.8%
Taylor expanded in y around 0
Applied rewrites47.0%
Taylor expanded in a around 0
Applied rewrites47.3%
if -3.80000000000000011e87 < z < 9.1999999999999996e24Initial program 74.4%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites53.9%
Taylor expanded in t around 0
Applied rewrites21.4%
Taylor expanded in z around 0
Applied rewrites44.4%
Taylor expanded in y around inf
Applied rewrites37.7%
if 1.15000000000000007e287 < z Initial program 87.7%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6444.4
Applied rewrites44.4%
Taylor expanded in t around 0
Applied rewrites75.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ z t) x)))
(if (<= z -2.2e-39)
t_1
(if (<= z 4.5e+24)
(+ (- y x) x)
(if (<= z 1.15e+287) t_1 (/ (* z y) a))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z / t) * x;
double tmp;
if (z <= -2.2e-39) {
tmp = t_1;
} else if (z <= 4.5e+24) {
tmp = (y - x) + x;
} else if (z <= 1.15e+287) {
tmp = t_1;
} else {
tmp = (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) :: t_1
real(8) :: tmp
t_1 = (z / t) * x
if (z <= (-2.2d-39)) then
tmp = t_1
else if (z <= 4.5d+24) then
tmp = (y - x) + x
else if (z <= 1.15d+287) then
tmp = t_1
else
tmp = (z * y) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (z / t) * x;
double tmp;
if (z <= -2.2e-39) {
tmp = t_1;
} else if (z <= 4.5e+24) {
tmp = (y - x) + x;
} else if (z <= 1.15e+287) {
tmp = t_1;
} else {
tmp = (z * y) / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z / t) * x tmp = 0 if z <= -2.2e-39: tmp = t_1 elif z <= 4.5e+24: tmp = (y - x) + x elif z <= 1.15e+287: tmp = t_1 else: tmp = (z * y) / a return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z / t) * x) tmp = 0.0 if (z <= -2.2e-39) tmp = t_1; elseif (z <= 4.5e+24) tmp = Float64(Float64(y - x) + x); elseif (z <= 1.15e+287) tmp = t_1; else tmp = Float64(Float64(z * y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z / t) * x; tmp = 0.0; if (z <= -2.2e-39) tmp = t_1; elseif (z <= 4.5e+24) tmp = (y - x) + x; elseif (z <= 1.15e+287) tmp = t_1; else tmp = (z * y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / t), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -2.2e-39], t$95$1, If[LessEqual[z, 4.5e+24], N[(N[(y - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 1.15e+287], t$95$1, N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{t} \cdot x\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+24}:\\
\;\;\;\;\left(y - x\right) + x\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+287}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\end{array}
\end{array}
if z < -2.20000000000000001e-39 or 4.50000000000000019e24 < z < 1.15000000000000007e287Initial program 69.3%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites63.4%
Taylor expanded in t around 0
Applied rewrites52.4%
Taylor expanded in y around 0
Applied rewrites42.5%
Taylor expanded in a around 0
Applied rewrites42.8%
if -2.20000000000000001e-39 < z < 4.50000000000000019e24Initial program 74.0%
Taylor expanded in t around inf
lower--.f6431.4
Applied rewrites31.4%
if 1.15000000000000007e287 < z Initial program 87.7%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6444.4
Applied rewrites44.4%
Taylor expanded in t around 0
Applied rewrites75.0%
Final simplification37.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* z x) t)))
(if (<= z -2.2e-39)
t_1
(if (<= z 9e+24) (+ (- y x) x) (if (<= z 8.5e+285) t_1 (/ (* z y) a))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z * x) / t;
double tmp;
if (z <= -2.2e-39) {
tmp = t_1;
} else if (z <= 9e+24) {
tmp = (y - x) + x;
} else if (z <= 8.5e+285) {
tmp = t_1;
} else {
tmp = (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) :: t_1
real(8) :: tmp
t_1 = (z * x) / t
if (z <= (-2.2d-39)) then
tmp = t_1
else if (z <= 9d+24) then
tmp = (y - x) + x
else if (z <= 8.5d+285) then
tmp = t_1
else
tmp = (z * y) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (z * x) / t;
double tmp;
if (z <= -2.2e-39) {
tmp = t_1;
} else if (z <= 9e+24) {
tmp = (y - x) + x;
} else if (z <= 8.5e+285) {
tmp = t_1;
} else {
tmp = (z * y) / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z * x) / t tmp = 0 if z <= -2.2e-39: tmp = t_1 elif z <= 9e+24: tmp = (y - x) + x elif z <= 8.5e+285: tmp = t_1 else: tmp = (z * y) / a return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z * x) / t) tmp = 0.0 if (z <= -2.2e-39) tmp = t_1; elseif (z <= 9e+24) tmp = Float64(Float64(y - x) + x); elseif (z <= 8.5e+285) tmp = t_1; else tmp = Float64(Float64(z * y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z * x) / t; tmp = 0.0; if (z <= -2.2e-39) tmp = t_1; elseif (z <= 9e+24) tmp = (y - x) + x; elseif (z <= 8.5e+285) tmp = t_1; else tmp = (z * y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z * x), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[z, -2.2e-39], t$95$1, If[LessEqual[z, 9e+24], N[(N[(y - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 8.5e+285], t$95$1, N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot x}{t}\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+24}:\\
\;\;\;\;\left(y - x\right) + x\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+285}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\end{array}
\end{array}
if z < -2.20000000000000001e-39 or 9.00000000000000039e24 < z < 8.5e285Initial program 69.3%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites63.4%
Taylor expanded in a around 0
Applied rewrites63.5%
Taylor expanded in y around 0
Applied rewrites34.7%
if -2.20000000000000001e-39 < z < 9.00000000000000039e24Initial program 74.0%
Taylor expanded in t around inf
lower--.f6431.4
Applied rewrites31.4%
if 8.5e285 < z Initial program 87.7%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6444.4
Applied rewrites44.4%
Taylor expanded in t around 0
Applied rewrites75.0%
Final simplification34.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- y x) (/ z a) x)))
(if (<= a -3.4e+120)
t_1
(if (<= a 1.35e+103) (fma (- x y) (/ z t) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y - x), (z / a), x);
double tmp;
if (a <= -3.4e+120) {
tmp = t_1;
} else if (a <= 1.35e+103) {
tmp = fma((x - y), (z / t), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - x), Float64(z / a), x) tmp = 0.0 if (a <= -3.4e+120) tmp = t_1; elseif (a <= 1.35e+103) tmp = fma(Float64(x - y), Float64(z / t), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -3.4e+120], t$95$1, If[LessEqual[a, 1.35e+103], N[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
\mathbf{if}\;a \leq -3.4 \cdot 10^{+120}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{+103}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.39999999999999999e120 or 1.34999999999999996e103 < a Initial program 78.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6496.4
Applied rewrites96.4%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6488.3
Applied rewrites88.3%
Taylor expanded in t around 0
Applied rewrites79.3%
if -3.39999999999999999e120 < a < 1.34999999999999996e103Initial program 69.7%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites74.7%
Taylor expanded in a around 0
Applied rewrites70.0%
Applied rewrites72.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y x) a) z x)))
(if (<= a -3.4e+120)
t_1
(if (<= a 1.35e+103) (fma (- x y) (/ z t) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - x) / a), z, x);
double tmp;
if (a <= -3.4e+120) {
tmp = t_1;
} else if (a <= 1.35e+103) {
tmp = fma((x - y), (z / t), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - x) / a), z, x) tmp = 0.0 if (a <= -3.4e+120) tmp = t_1; elseif (a <= 1.35e+103) tmp = fma(Float64(x - y), Float64(z / t), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] * z + x), $MachinePrecision]}, If[LessEqual[a, -3.4e+120], t$95$1, If[LessEqual[a, 1.35e+103], N[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - x}{a}, z, x\right)\\
\mathbf{if}\;a \leq -3.4 \cdot 10^{+120}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{+103}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.39999999999999999e120 or 1.34999999999999996e103 < a Initial program 78.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6475.3
Applied rewrites75.3%
if -3.39999999999999999e120 < a < 1.34999999999999996e103Initial program 69.7%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites74.7%
Taylor expanded in a around 0
Applied rewrites70.0%
Applied rewrites72.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- x y) (/ z t) y))) (if (<= t -1.48e-180) t_1 (if (<= t 4.3e-92) (/ (* (- y x) z) a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), (z / t), y);
double tmp;
if (t <= -1.48e-180) {
tmp = t_1;
} else if (t <= 4.3e-92) {
tmp = ((y - x) * z) / a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(z / t), y) tmp = 0.0 if (t <= -1.48e-180) tmp = t_1; elseif (t <= 4.3e-92) tmp = Float64(Float64(Float64(y - x) * z) / a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.48e-180], t$95$1, If[LessEqual[t, 4.3e-92], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\mathbf{if}\;t \leq -1.48 \cdot 10^{-180}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{-92}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.47999999999999994e-180 or 4.30000000000000014e-92 < t Initial program 65.7%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites69.4%
Taylor expanded in a around 0
Applied rewrites64.4%
Applied rewrites65.1%
if -1.47999999999999994e-180 < t < 4.30000000000000014e-92Initial program 91.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6494.7
Applied rewrites94.7%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6483.3
Applied rewrites83.3%
Taylor expanded in z around inf
Applied rewrites53.2%
Final simplification62.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ x t) z y))) (if (<= t -4.4e-175) t_1 (if (<= t 1.6e-86) (/ (* (- y x) z) a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x / t), z, y);
double tmp;
if (t <= -4.4e-175) {
tmp = t_1;
} else if (t <= 1.6e-86) {
tmp = ((y - x) * z) / a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x / t), z, y) tmp = 0.0 if (t <= -4.4e-175) tmp = t_1; elseif (t <= 1.6e-86) tmp = Float64(Float64(Float64(y - x) * z) / a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / t), $MachinePrecision] * z + y), $MachinePrecision]}, If[LessEqual[t, -4.4e-175], t$95$1, If[LessEqual[t, 1.6e-86], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x}{t}, z, y\right)\\
\mathbf{if}\;t \leq -4.4 \cdot 10^{-175}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-86}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.4e-175 or 1.60000000000000003e-86 < t Initial program 65.4%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites70.1%
Taylor expanded in a around 0
Applied rewrites65.1%
Taylor expanded in y around 0
Applied rewrites55.3%
if -4.4e-175 < t < 1.60000000000000003e-86Initial program 92.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6494.9
Applied rewrites94.9%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6482.4
Applied rewrites82.4%
Taylor expanded in z around inf
Applied rewrites51.8%
Final simplification54.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ (- z t) a) y))) (if (<= a -3.7e+174) t_1 (if (<= a 2.7e+124) (fma (/ x t) z y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((z - t) / a) * y;
double tmp;
if (a <= -3.7e+174) {
tmp = t_1;
} else if (a <= 2.7e+124) {
tmp = fma((x / t), z, y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(z - t) / a) * y) tmp = 0.0 if (a <= -3.7e+174) tmp = t_1; elseif (a <= 2.7e+124) tmp = fma(Float64(x / t), z, y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[a, -3.7e+174], t$95$1, If[LessEqual[a, 2.7e+124], N[(N[(x / t), $MachinePrecision] * z + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - t}{a} \cdot y\\
\mathbf{if}\;a \leq -3.7 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{+124}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.7000000000000002e174 or 2.69999999999999978e124 < a Initial program 73.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6495.6
Applied rewrites95.6%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6490.3
Applied rewrites90.3%
Taylor expanded in y around inf
Applied rewrites31.8%
if -3.7000000000000002e174 < a < 2.69999999999999978e124Initial program 71.8%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites71.4%
Taylor expanded in a around 0
Applied rewrites67.0%
Taylor expanded in y around 0
Applied rewrites58.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ x t) z y))) (if (<= x -1.15e-104) t_1 (if (<= x 1.95e-106) (fma (/ (- y) t) z y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x / t), z, y);
double tmp;
if (x <= -1.15e-104) {
tmp = t_1;
} else if (x <= 1.95e-106) {
tmp = fma((-y / t), z, y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x / t), z, y) tmp = 0.0 if (x <= -1.15e-104) tmp = t_1; elseif (x <= 1.95e-106) tmp = fma(Float64(Float64(-y) / t), z, y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / t), $MachinePrecision] * z + y), $MachinePrecision]}, If[LessEqual[x, -1.15e-104], t$95$1, If[LessEqual[x, 1.95e-106], N[(N[((-y) / t), $MachinePrecision] * z + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x}{t}, z, y\right)\\
\mathbf{if}\;x \leq -1.15 \cdot 10^{-104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.95 \cdot 10^{-106}:\\
\;\;\;\;\mathsf{fma}\left(\frac{-y}{t}, z, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.15e-104 or 1.95000000000000005e-106 < x Initial program 66.8%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites58.8%
Taylor expanded in a around 0
Applied rewrites54.1%
Taylor expanded in y around 0
Applied rewrites50.9%
if -1.15e-104 < x < 1.95000000000000005e-106Initial program 84.6%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites53.8%
Taylor expanded in a around 0
Applied rewrites52.4%
Taylor expanded in y around inf
Applied rewrites52.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ z a) y))) (if (<= z -6.8e+105) t_1 (if (<= z 9e+21) (+ (- y x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z / a) * y;
double tmp;
if (z <= -6.8e+105) {
tmp = t_1;
} else if (z <= 9e+21) {
tmp = (y - x) + 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 = (z / a) * y
if (z <= (-6.8d+105)) then
tmp = t_1
else if (z <= 9d+21) then
tmp = (y - x) + 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 = (z / a) * y;
double tmp;
if (z <= -6.8e+105) {
tmp = t_1;
} else if (z <= 9e+21) {
tmp = (y - x) + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z / a) * y tmp = 0 if z <= -6.8e+105: tmp = t_1 elif z <= 9e+21: tmp = (y - x) + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z / a) * y) tmp = 0.0 if (z <= -6.8e+105) tmp = t_1; elseif (z <= 9e+21) tmp = Float64(Float64(y - x) + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z / a) * y; tmp = 0.0; if (z <= -6.8e+105) tmp = t_1; elseif (z <= 9e+21) tmp = (y - x) + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / a), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -6.8e+105], t$95$1, If[LessEqual[z, 9e+21], N[(N[(y - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{a} \cdot y\\
\mathbf{if}\;z \leq -6.8 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+21}:\\
\;\;\;\;\left(y - x\right) + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.7999999999999999e105 or 9e21 < z Initial program 70.4%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.7
Applied rewrites42.7%
Taylor expanded in a around inf
Applied rewrites32.3%
Taylor expanded in t around 0
Applied rewrites33.3%
if -6.7999999999999999e105 < z < 9e21Initial program 73.4%
Taylor expanded in t around inf
lower--.f6429.1
Applied rewrites29.1%
Final simplification30.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -7.4e+180) (* (/ z a) y) (fma (/ x t) z y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.4e+180) {
tmp = (z / a) * y;
} else {
tmp = fma((x / t), z, y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7.4e+180) tmp = Float64(Float64(z / a) * y); else tmp = fma(Float64(x / t), z, y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.4e+180], N[(N[(z / a), $MachinePrecision] * y), $MachinePrecision], N[(N[(x / t), $MachinePrecision] * z + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.4 \cdot 10^{+180}:\\
\;\;\;\;\frac{z}{a} \cdot y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z, y\right)\\
\end{array}
\end{array}
if a < -7.4000000000000003e180Initial program 86.2%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6429.9
Applied rewrites29.9%
Taylor expanded in a around inf
Applied rewrites29.9%
Taylor expanded in t around 0
Applied rewrites35.3%
if -7.4000000000000003e180 < a Initial program 71.0%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites61.6%
Taylor expanded in a around 0
Applied rewrites57.7%
Taylor expanded in y around 0
Applied rewrites50.3%
Final simplification49.0%
(FPCore (x y z t a) :precision binary64 (+ (- y x) x))
double code(double x, double y, double z, double t, double a) {
return (y - x) + x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (y - x) + x
end function
public static double code(double x, double y, double z, double t, double a) {
return (y - x) + x;
}
def code(x, y, z, t, a): return (y - x) + x
function code(x, y, z, t, a) return Float64(Float64(y - x) + x) end
function tmp = code(x, y, z, t, a) tmp = (y - x) + x; end
code[x_, y_, z_, t_, a_] := N[(N[(y - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\left(y - x\right) + x
\end{array}
Initial program 72.2%
Taylor expanded in t around inf
lower--.f6420.6
Applied rewrites20.6%
Final simplification20.6%
(FPCore (x y z t a) :precision binary64 (+ (- x) x))
double code(double x, double y, double z, double t, double a) {
return -x + 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 + x
end function
public static double code(double x, double y, double z, double t, double a) {
return -x + x;
}
def code(x, y, z, t, a): return -x + x
function code(x, y, z, t, a) return Float64(Float64(-x) + x) end
function tmp = code(x, y, z, t, a) tmp = -x + x; end
code[x_, y_, z_, t_, a_] := N[((-x) + x), $MachinePrecision]
\begin{array}{l}
\\
\left(-x\right) + x
\end{array}
Initial program 72.2%
Taylor expanded in t around inf
lower--.f6420.6
Applied rewrites20.6%
Taylor expanded in y around 0
Applied rewrites2.7%
Final simplification2.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(if (< a -1.6153062845442575e-142)
t_1
(if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - 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 - x) / 1.0d0) * ((z - t) / (a - t)))
if (a < (-1.6153062845442575d-142)) then
tmp = t_1
else if (a < 3.774403170083174d-182) then
tmp = y - ((z / t) * (y - 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 - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))) tmp = 0 if a < -1.6153062845442575e-142: tmp = t_1 elif a < 3.774403170083174e-182: tmp = y - ((z / t) * (y - x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))); tmp = 0.0; if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = y - ((z / t) * (y - x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024270
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))