
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * exp(((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.exp(((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.exp(((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * exp(Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * exp(((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.exp(((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.exp(((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * exp(Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}
\end{array}
(FPCore (x y z t) :precision binary64 (* (sqrt (* z (* (pow (exp t) t) 2.0))) (- (* x 0.5) y)))
double code(double x, double y, double z, double t) {
return sqrt((z * (pow(exp(t), t) * 2.0))) * ((x * 0.5) - y);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = sqrt((z * ((exp(t) ** t) * 2.0d0))) * ((x * 0.5d0) - y)
end function
public static double code(double x, double y, double z, double t) {
return Math.sqrt((z * (Math.pow(Math.exp(t), t) * 2.0))) * ((x * 0.5) - y);
}
def code(x, y, z, t): return math.sqrt((z * (math.pow(math.exp(t), t) * 2.0))) * ((x * 0.5) - y)
function code(x, y, z, t) return Float64(sqrt(Float64(z * Float64((exp(t) ^ t) * 2.0))) * Float64(Float64(x * 0.5) - y)) end
function tmp = code(x, y, z, t) tmp = sqrt((z * ((exp(t) ^ t) * 2.0))) * ((x * 0.5) - y); end
code[x_, y_, z_, t_] := N[(N[Sqrt[N[(z * N[(N[Power[N[Exp[t], $MachinePrecision], t], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{z \cdot \left({\left(e^{t}\right)}^{t} \cdot 2\right)} \cdot \left(x \cdot 0.5 - y\right)
\end{array}
Initial program 98.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
unpow-prod-downN/A
associate-*l*N/A
*-commutativeN/A
pow1/2N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
pow1/2N/A
sqrt-unprodN/A
lower-sqrt.f64N/A
Applied rewrites99.5%
Final simplification99.5%
(FPCore (x y z t) :precision binary64 (if (<= (exp (/ (* t t) 2.0)) 1.0) (* (* (sqrt 2.0) (sqrt z)) (- (* x 0.5) y)) (* (sqrt (* (fma (* t t) z z) 2.0)) (- y))))
double code(double x, double y, double z, double t) {
double tmp;
if (exp(((t * t) / 2.0)) <= 1.0) {
tmp = (sqrt(2.0) * sqrt(z)) * ((x * 0.5) - y);
} else {
tmp = sqrt((fma((t * t), z, z) * 2.0)) * -y;
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (exp(Float64(Float64(t * t) / 2.0)) <= 1.0) tmp = Float64(Float64(sqrt(2.0) * sqrt(z)) * Float64(Float64(x * 0.5) - y)); else tmp = Float64(sqrt(Float64(fma(Float64(t * t), z, z) * 2.0)) * Float64(-y)); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision], 1.0], N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[z], $MachinePrecision]), $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(N[(t * t), $MachinePrecision] * z + z), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * (-y)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{\frac{t \cdot t}{2}} \leq 1:\\
\;\;\;\;\left(\sqrt{2} \cdot \sqrt{z}\right) \cdot \left(x \cdot 0.5 - y\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(t \cdot t, z, z\right) \cdot 2} \cdot \left(-y\right)\\
\end{array}
\end{array}
if (exp.f64 (/.f64 (*.f64 t t) #s(literal 2 binary64))) < 1Initial program 99.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
unpow-prod-downN/A
associate-*l*N/A
*-commutativeN/A
pow1/2N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
pow1/2N/A
sqrt-unprodN/A
lower-sqrt.f64N/A
Applied rewrites99.0%
lift-pow.f64N/A
lift-exp.f64N/A
pow-expN/A
lift-*.f64N/A
lower-exp.f6499.0
Applied rewrites99.0%
Taylor expanded in t around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f6499.4
Applied rewrites99.4%
if 1 < (exp.f64 (/.f64 (*.f64 t t) #s(literal 2 binary64))) Initial program 98.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
unpow-prod-downN/A
associate-*l*N/A
*-commutativeN/A
pow1/2N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
pow1/2N/A
sqrt-unprodN/A
lower-sqrt.f64N/A
Applied rewrites100.0%
Taylor expanded in t around 0
lower-*.f6414.6
Applied rewrites14.6%
Taylor expanded in x around 0
mul-1-negN/A
lower-neg.f6410.4
Applied rewrites10.4%
Taylor expanded in t around 0
+-commutativeN/A
distribute-lft-outN/A
lower-*.f64N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6452.9
Applied rewrites52.9%
Final simplification74.9%
(FPCore (x y z t) :precision binary64 (if (<= (exp (/ (* t t) 2.0)) 1.0) (* (sqrt (* z 2.0)) (- (* x 0.5) y)) (* (sqrt (* (fma (* t t) z z) 2.0)) (- y))))
double code(double x, double y, double z, double t) {
double tmp;
if (exp(((t * t) / 2.0)) <= 1.0) {
tmp = sqrt((z * 2.0)) * ((x * 0.5) - y);
} else {
tmp = sqrt((fma((t * t), z, z) * 2.0)) * -y;
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (exp(Float64(Float64(t * t) / 2.0)) <= 1.0) tmp = Float64(sqrt(Float64(z * 2.0)) * Float64(Float64(x * 0.5) - y)); else tmp = Float64(sqrt(Float64(fma(Float64(t * t), z, z) * 2.0)) * Float64(-y)); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision], 1.0], N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(N[(t * t), $MachinePrecision] * z + z), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * (-y)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{\frac{t \cdot t}{2}} \leq 1:\\
\;\;\;\;\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(t \cdot t, z, z\right) \cdot 2} \cdot \left(-y\right)\\
\end{array}
\end{array}
if (exp.f64 (/.f64 (*.f64 t t) #s(literal 2 binary64))) < 1Initial program 99.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
unpow-prod-downN/A
associate-*l*N/A
*-commutativeN/A
pow1/2N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
pow1/2N/A
sqrt-unprodN/A
lower-sqrt.f64N/A
Applied rewrites99.0%
Taylor expanded in t around 0
lower-*.f6499.0
Applied rewrites99.0%
if 1 < (exp.f64 (/.f64 (*.f64 t t) #s(literal 2 binary64))) Initial program 98.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
unpow-prod-downN/A
associate-*l*N/A
*-commutativeN/A
pow1/2N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
pow1/2N/A
sqrt-unprodN/A
lower-sqrt.f64N/A
Applied rewrites100.0%
Taylor expanded in t around 0
lower-*.f6414.6
Applied rewrites14.6%
Taylor expanded in x around 0
mul-1-negN/A
lower-neg.f6410.4
Applied rewrites10.4%
Taylor expanded in t around 0
+-commutativeN/A
distribute-lft-outN/A
lower-*.f64N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6452.9
Applied rewrites52.9%
Final simplification74.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1
(fma
(fma (fma 0.020833333333333332 (* t t) 0.125) (* t t) 0.5)
(* t t)
1.0)))
(if (<= (* t t) 500.0)
(* t_1 (* (* (sqrt 2.0) (sqrt z)) (- (* x 0.5) y)))
(if (<= (* t t) 2e+57)
(* (- y) (sqrt (* (* (exp (* t t)) 2.0) z)))
(*
(fma x 0.5 (- y))
(* (/ (* (sqrt (* z 2.0)) t_1) (fma x 0.5 y)) (fma x 0.5 y)))))))
double code(double x, double y, double z, double t) {
double t_1 = fma(fma(fma(0.020833333333333332, (t * t), 0.125), (t * t), 0.5), (t * t), 1.0);
double tmp;
if ((t * t) <= 500.0) {
tmp = t_1 * ((sqrt(2.0) * sqrt(z)) * ((x * 0.5) - y));
} else if ((t * t) <= 2e+57) {
tmp = -y * sqrt(((exp((t * t)) * 2.0) * z));
} else {
tmp = fma(x, 0.5, -y) * (((sqrt((z * 2.0)) * t_1) / fma(x, 0.5, y)) * fma(x, 0.5, y));
}
return tmp;
}
function code(x, y, z, t) t_1 = fma(fma(fma(0.020833333333333332, Float64(t * t), 0.125), Float64(t * t), 0.5), Float64(t * t), 1.0) tmp = 0.0 if (Float64(t * t) <= 500.0) tmp = Float64(t_1 * Float64(Float64(sqrt(2.0) * sqrt(z)) * Float64(Float64(x * 0.5) - y))); elseif (Float64(t * t) <= 2e+57) tmp = Float64(Float64(-y) * sqrt(Float64(Float64(exp(Float64(t * t)) * 2.0) * z))); else tmp = Float64(fma(x, 0.5, Float64(-y)) * Float64(Float64(Float64(sqrt(Float64(z * 2.0)) * t_1) / fma(x, 0.5, y)) * fma(x, 0.5, y))); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(0.020833333333333332 * N[(t * t), $MachinePrecision] + 0.125), $MachinePrecision] * N[(t * t), $MachinePrecision] + 0.5), $MachinePrecision] * N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[N[(t * t), $MachinePrecision], 500.0], N[(t$95$1 * N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[z], $MachinePrecision]), $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t * t), $MachinePrecision], 2e+57], N[((-y) * N[Sqrt[N[(N[(N[Exp[N[(t * t), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(x * 0.5 + (-y)), $MachinePrecision] * N[(N[(N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision] / N[(x * 0.5 + y), $MachinePrecision]), $MachinePrecision] * N[(x * 0.5 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.020833333333333332, t \cdot t, 0.125\right), t \cdot t, 0.5\right), t \cdot t, 1\right)\\
\mathbf{if}\;t \cdot t \leq 500:\\
\;\;\;\;t\_1 \cdot \left(\left(\sqrt{2} \cdot \sqrt{z}\right) \cdot \left(x \cdot 0.5 - y\right)\right)\\
\mathbf{elif}\;t \cdot t \leq 2 \cdot 10^{+57}:\\
\;\;\;\;\left(-y\right) \cdot \sqrt{\left(e^{t \cdot t} \cdot 2\right) \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, 0.5, -y\right) \cdot \left(\frac{\sqrt{z \cdot 2} \cdot t\_1}{\mathsf{fma}\left(x, 0.5, y\right)} \cdot \mathsf{fma}\left(x, 0.5, y\right)\right)\\
\end{array}
\end{array}
if (*.f64 t t) < 500Initial program 98.9%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6498.2
Applied rewrites98.2%
lift-sqrt.f64N/A
lift-*.f64N/A
sqrt-prodN/A
lift-sqrt.f64N/A
lift-sqrt.f64N/A
lower-*.f6498.5
Applied rewrites98.5%
if 500 < (*.f64 t t) < 2.0000000000000001e57Initial program 100.0%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
unpow-prod-downN/A
associate-*l*N/A
*-commutativeN/A
pow1/2N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
pow1/2N/A
sqrt-unprodN/A
lower-sqrt.f64N/A
Applied rewrites100.0%
lift-pow.f64N/A
lift-exp.f64N/A
pow-expN/A
lift-*.f64N/A
lower-exp.f64100.0
Applied rewrites100.0%
Taylor expanded in x around 0
mul-1-negN/A
lower-neg.f6480.0
Applied rewrites80.0%
if 2.0000000000000001e57 < (*.f64 t t) Initial program 98.3%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6493.4
Applied rewrites93.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites95.1%
Applied rewrites98.4%
Final simplification97.4%
(FPCore (x y z t) :precision binary64 (* (sqrt (* (* (exp (* t t)) 2.0) z)) (- (* x 0.5) y)))
double code(double x, double y, double z, double t) {
return sqrt(((exp((t * t)) * 2.0) * z)) * ((x * 0.5) - y);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = sqrt(((exp((t * t)) * 2.0d0) * z)) * ((x * 0.5d0) - y)
end function
public static double code(double x, double y, double z, double t) {
return Math.sqrt(((Math.exp((t * t)) * 2.0) * z)) * ((x * 0.5) - y);
}
def code(x, y, z, t): return math.sqrt(((math.exp((t * t)) * 2.0) * z)) * ((x * 0.5) - y)
function code(x, y, z, t) return Float64(sqrt(Float64(Float64(exp(Float64(t * t)) * 2.0) * z)) * Float64(Float64(x * 0.5) - y)) end
function tmp = code(x, y, z, t) tmp = sqrt(((exp((t * t)) * 2.0) * z)) * ((x * 0.5) - y); end
code[x_, y_, z_, t_] := N[(N[Sqrt[N[(N[(N[Exp[N[(t * t), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(e^{t \cdot t} \cdot 2\right) \cdot z} \cdot \left(x \cdot 0.5 - y\right)
\end{array}
Initial program 98.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
unpow-prod-downN/A
associate-*l*N/A
*-commutativeN/A
pow1/2N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
pow1/2N/A
sqrt-unprodN/A
lower-sqrt.f64N/A
Applied rewrites99.5%
lift-pow.f64N/A
lift-exp.f64N/A
pow-expN/A
lift-*.f64N/A
lower-exp.f6499.5
Applied rewrites99.5%
Final simplification99.5%
(FPCore (x y z t)
:precision binary64
(*
(*
(*
(fma x 0.5 (- y))
(fma
(fma (fma 0.020833333333333332 (* t t) 0.125) (* t t) 0.5)
(* t t)
1.0))
(sqrt z))
(sqrt 2.0)))
double code(double x, double y, double z, double t) {
return ((fma(x, 0.5, -y) * fma(fma(fma(0.020833333333333332, (t * t), 0.125), (t * t), 0.5), (t * t), 1.0)) * sqrt(z)) * sqrt(2.0);
}
function code(x, y, z, t) return Float64(Float64(Float64(fma(x, 0.5, Float64(-y)) * fma(fma(fma(0.020833333333333332, Float64(t * t), 0.125), Float64(t * t), 0.5), Float64(t * t), 1.0)) * sqrt(z)) * sqrt(2.0)) end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5 + (-y)), $MachinePrecision] * N[(N[(N[(0.020833333333333332 * N[(t * t), $MachinePrecision] + 0.125), $MachinePrecision] * N[(t * t), $MachinePrecision] + 0.5), $MachinePrecision] * N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[Sqrt[z], $MachinePrecision]), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\mathsf{fma}\left(x, 0.5, -y\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.020833333333333332, t \cdot t, 0.125\right), t \cdot t, 0.5\right), t \cdot t, 1\right)\right) \cdot \sqrt{z}\right) \cdot \sqrt{2}
\end{array}
Initial program 98.7%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6491.7
Applied rewrites91.7%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites92.8%
lift-*.f64N/A
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
unpow-prod-downN/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites92.9%
Final simplification92.9%
(FPCore (x y z t)
:precision binary64
(*
(*
(*
(fma x 0.5 (- y))
(fma
(fma (fma 0.020833333333333332 (* t t) 0.125) (* t t) 0.5)
(* t t)
1.0))
(sqrt 2.0))
(sqrt z)))
double code(double x, double y, double z, double t) {
return ((fma(x, 0.5, -y) * fma(fma(fma(0.020833333333333332, (t * t), 0.125), (t * t), 0.5), (t * t), 1.0)) * sqrt(2.0)) * sqrt(z);
}
function code(x, y, z, t) return Float64(Float64(Float64(fma(x, 0.5, Float64(-y)) * fma(fma(fma(0.020833333333333332, Float64(t * t), 0.125), Float64(t * t), 0.5), Float64(t * t), 1.0)) * sqrt(2.0)) * sqrt(z)) end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5 + (-y)), $MachinePrecision] * N[(N[(N[(0.020833333333333332 * N[(t * t), $MachinePrecision] + 0.125), $MachinePrecision] * N[(t * t), $MachinePrecision] + 0.5), $MachinePrecision] * N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[z], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\mathsf{fma}\left(x, 0.5, -y\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.020833333333333332, t \cdot t, 0.125\right), t \cdot t, 0.5\right), t \cdot t, 1\right)\right) \cdot \sqrt{2}\right) \cdot \sqrt{z}
\end{array}
Initial program 98.7%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6491.7
Applied rewrites91.7%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites92.8%
lift-*.f64N/A
*-commutativeN/A
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
unpow-prod-downN/A
associate-*l*N/A
lower-*.f64N/A
pow1/2N/A
lower-sqrt.f64N/A
lower-*.f64N/A
pow1/2N/A
lower-sqrt.f6492.9
Applied rewrites92.9%
Final simplification92.9%
(FPCore (x y z t) :precision binary64 (* (* (fma (fma (fma (* t t) 0.020833333333333332 0.125) (* t t) 0.5) (* t t) 1.0) (sqrt (* z 2.0))) (- (* x 0.5) y)))
double code(double x, double y, double z, double t) {
return (fma(fma(fma((t * t), 0.020833333333333332, 0.125), (t * t), 0.5), (t * t), 1.0) * sqrt((z * 2.0))) * ((x * 0.5) - y);
}
function code(x, y, z, t) return Float64(Float64(fma(fma(fma(Float64(t * t), 0.020833333333333332, 0.125), Float64(t * t), 0.5), Float64(t * t), 1.0) * sqrt(Float64(z * 2.0))) * Float64(Float64(x * 0.5) - y)) end
code[x_, y_, z_, t_] := N[(N[(N[(N[(N[(N[(t * t), $MachinePrecision] * 0.020833333333333332 + 0.125), $MachinePrecision] * N[(t * t), $MachinePrecision] + 0.5), $MachinePrecision] * N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(t \cdot t, 0.020833333333333332, 0.125\right), t \cdot t, 0.5\right), t \cdot t, 1\right) \cdot \sqrt{z \cdot 2}\right) \cdot \left(x \cdot 0.5 - y\right)
\end{array}
Initial program 98.7%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6491.7
Applied rewrites91.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f6492.8
Applied rewrites92.8%
Final simplification92.8%
(FPCore (x y z t) :precision binary64 (* (* (fma (fma (fma (* 0.020833333333333332 t) t 0.125) (* t t) 0.5) (* t t) 1.0) (- (* x 0.5) y)) (sqrt (* z 2.0))))
double code(double x, double y, double z, double t) {
return (fma(fma(fma((0.020833333333333332 * t), t, 0.125), (t * t), 0.5), (t * t), 1.0) * ((x * 0.5) - y)) * sqrt((z * 2.0));
}
function code(x, y, z, t) return Float64(Float64(fma(fma(fma(Float64(0.020833333333333332 * t), t, 0.125), Float64(t * t), 0.5), Float64(t * t), 1.0) * Float64(Float64(x * 0.5) - y)) * sqrt(Float64(z * 2.0))) end
code[x_, y_, z_, t_] := N[(N[(N[(N[(N[(N[(0.020833333333333332 * t), $MachinePrecision] * t + 0.125), $MachinePrecision] * N[(t * t), $MachinePrecision] + 0.5), $MachinePrecision] * N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.020833333333333332 \cdot t, t, 0.125\right), t \cdot t, 0.5\right), t \cdot t, 1\right) \cdot \left(x \cdot 0.5 - y\right)\right) \cdot \sqrt{z \cdot 2}
\end{array}
Initial program 98.7%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6491.7
Applied rewrites91.7%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites92.8%
Applied rewrites92.8%
(FPCore (x y z t) :precision binary64 (* (* (fma (fma (* 0.020833333333333332 (* t t)) (* t t) 0.5) (* t t) 1.0) (sqrt (* z 2.0))) (- (* x 0.5) y)))
double code(double x, double y, double z, double t) {
return (fma(fma((0.020833333333333332 * (t * t)), (t * t), 0.5), (t * t), 1.0) * sqrt((z * 2.0))) * ((x * 0.5) - y);
}
function code(x, y, z, t) return Float64(Float64(fma(fma(Float64(0.020833333333333332 * Float64(t * t)), Float64(t * t), 0.5), Float64(t * t), 1.0) * sqrt(Float64(z * 2.0))) * Float64(Float64(x * 0.5) - y)) end
code[x_, y_, z_, t_] := N[(N[(N[(N[(N[(0.020833333333333332 * N[(t * t), $MachinePrecision]), $MachinePrecision] * N[(t * t), $MachinePrecision] + 0.5), $MachinePrecision] * N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\mathsf{fma}\left(\mathsf{fma}\left(0.020833333333333332 \cdot \left(t \cdot t\right), t \cdot t, 0.5\right), t \cdot t, 1\right) \cdot \sqrt{z \cdot 2}\right) \cdot \left(x \cdot 0.5 - y\right)
\end{array}
Initial program 98.7%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6491.7
Applied rewrites91.7%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites92.8%
Taylor expanded in t around inf
Applied rewrites92.7%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6492.7
Applied rewrites92.7%
Final simplification92.7%
(FPCore (x y z t) :precision binary64 (* (* (fma (fma (* 0.020833333333333332 (* t t)) (* t t) 0.5) (* t t) 1.0) (- (* x 0.5) y)) (sqrt (* z 2.0))))
double code(double x, double y, double z, double t) {
return (fma(fma((0.020833333333333332 * (t * t)), (t * t), 0.5), (t * t), 1.0) * ((x * 0.5) - y)) * sqrt((z * 2.0));
}
function code(x, y, z, t) return Float64(Float64(fma(fma(Float64(0.020833333333333332 * Float64(t * t)), Float64(t * t), 0.5), Float64(t * t), 1.0) * Float64(Float64(x * 0.5) - y)) * sqrt(Float64(z * 2.0))) end
code[x_, y_, z_, t_] := N[(N[(N[(N[(N[(0.020833333333333332 * N[(t * t), $MachinePrecision]), $MachinePrecision] * N[(t * t), $MachinePrecision] + 0.5), $MachinePrecision] * N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\mathsf{fma}\left(\mathsf{fma}\left(0.020833333333333332 \cdot \left(t \cdot t\right), t \cdot t, 0.5\right), t \cdot t, 1\right) \cdot \left(x \cdot 0.5 - y\right)\right) \cdot \sqrt{z \cdot 2}
\end{array}
Initial program 98.7%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6491.7
Applied rewrites91.7%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites92.8%
Taylor expanded in t around inf
Applied rewrites92.7%
(FPCore (x y z t) :precision binary64 (* (* (fma (fma 0.125 (* t t) 0.5) (* t t) 1.0) (- (* x 0.5) y)) (sqrt (* z 2.0))))
double code(double x, double y, double z, double t) {
return (fma(fma(0.125, (t * t), 0.5), (t * t), 1.0) * ((x * 0.5) - y)) * sqrt((z * 2.0));
}
function code(x, y, z, t) return Float64(Float64(fma(fma(0.125, Float64(t * t), 0.5), Float64(t * t), 1.0) * Float64(Float64(x * 0.5) - y)) * sqrt(Float64(z * 2.0))) end
code[x_, y_, z_, t_] := N[(N[(N[(N[(0.125 * N[(t * t), $MachinePrecision] + 0.5), $MachinePrecision] * N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\mathsf{fma}\left(\mathsf{fma}\left(0.125, t \cdot t, 0.5\right), t \cdot t, 1\right) \cdot \left(x \cdot 0.5 - y\right)\right) \cdot \sqrt{z \cdot 2}
\end{array}
Initial program 98.7%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6491.7
Applied rewrites91.7%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites92.8%
Taylor expanded in t around 0
Applied rewrites91.6%
(FPCore (x y z t) :precision binary64 (* (sqrt (* (fma (fma t t 2.0) (* t t) 2.0) z)) (- (* x 0.5) y)))
double code(double x, double y, double z, double t) {
return sqrt((fma(fma(t, t, 2.0), (t * t), 2.0) * z)) * ((x * 0.5) - y);
}
function code(x, y, z, t) return Float64(sqrt(Float64(fma(fma(t, t, 2.0), Float64(t * t), 2.0) * z)) * Float64(Float64(x * 0.5) - y)) end
code[x_, y_, z_, t_] := N[(N[Sqrt[N[(N[(N[(t * t + 2.0), $MachinePrecision] * N[(t * t), $MachinePrecision] + 2.0), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(t, t, 2\right), t \cdot t, 2\right) \cdot z} \cdot \left(x \cdot 0.5 - y\right)
\end{array}
Initial program 98.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
unpow-prod-downN/A
associate-*l*N/A
*-commutativeN/A
pow1/2N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
pow1/2N/A
sqrt-unprodN/A
lower-sqrt.f64N/A
Applied rewrites99.5%
lift-pow.f64N/A
lift-exp.f64N/A
pow-expN/A
lift-*.f64N/A
lower-exp.f6499.5
Applied rewrites99.5%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
distribute-rgt-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
lower-*.f64N/A
lower-fma.f64N/A
+-commutativeN/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6490.8
Applied rewrites90.8%
Final simplification90.8%
(FPCore (x y z t) :precision binary64 (* (* (fma (* t t) 0.5 1.0) (- (* x 0.5) y)) (sqrt (* z 2.0))))
double code(double x, double y, double z, double t) {
return (fma((t * t), 0.5, 1.0) * ((x * 0.5) - y)) * sqrt((z * 2.0));
}
function code(x, y, z, t) return Float64(Float64(fma(Float64(t * t), 0.5, 1.0) * Float64(Float64(x * 0.5) - y)) * sqrt(Float64(z * 2.0))) end
code[x_, y_, z_, t_] := N[(N[(N[(N[(t * t), $MachinePrecision] * 0.5 + 1.0), $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\mathsf{fma}\left(t \cdot t, 0.5, 1\right) \cdot \left(x \cdot 0.5 - y\right)\right) \cdot \sqrt{z \cdot 2}
\end{array}
Initial program 98.7%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6491.7
Applied rewrites91.7%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites92.8%
Taylor expanded in t around inf
Applied rewrites92.7%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6485.5
Applied rewrites85.5%
(FPCore (x y z t) :precision binary64 (* (sqrt (* (* (fma t t 1.0) 2.0) z)) (- (* x 0.5) y)))
double code(double x, double y, double z, double t) {
return sqrt(((fma(t, t, 1.0) * 2.0) * z)) * ((x * 0.5) - y);
}
function code(x, y, z, t) return Float64(sqrt(Float64(Float64(fma(t, t, 1.0) * 2.0) * z)) * Float64(Float64(x * 0.5) - y)) end
code[x_, y_, z_, t_] := N[(N[Sqrt[N[(N[(N[(t * t + 1.0), $MachinePrecision] * 2.0), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\mathsf{fma}\left(t, t, 1\right) \cdot 2\right) \cdot z} \cdot \left(x \cdot 0.5 - y\right)
\end{array}
Initial program 98.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
unpow-prod-downN/A
associate-*l*N/A
*-commutativeN/A
pow1/2N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
pow1/2N/A
sqrt-unprodN/A
lower-sqrt.f64N/A
Applied rewrites99.5%
Taylor expanded in t around 0
+-commutativeN/A
unpow2N/A
lower-fma.f6482.5
Applied rewrites82.5%
Final simplification82.5%
(FPCore (x y z t) :precision binary64 (* (sqrt (* z 2.0)) (- (* x 0.5) y)))
double code(double x, double y, double z, double t) {
return sqrt((z * 2.0)) * ((x * 0.5) - y);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = sqrt((z * 2.0d0)) * ((x * 0.5d0) - y)
end function
public static double code(double x, double y, double z, double t) {
return Math.sqrt((z * 2.0)) * ((x * 0.5) - y);
}
def code(x, y, z, t): return math.sqrt((z * 2.0)) * ((x * 0.5) - y)
function code(x, y, z, t) return Float64(sqrt(Float64(z * 2.0)) * Float64(Float64(x * 0.5) - y)) end
function tmp = code(x, y, z, t) tmp = sqrt((z * 2.0)) * ((x * 0.5) - y); end
code[x_, y_, z_, t_] := N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)
\end{array}
Initial program 98.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
unpow-prod-downN/A
associate-*l*N/A
*-commutativeN/A
pow1/2N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
pow1/2N/A
sqrt-unprodN/A
lower-sqrt.f64N/A
Applied rewrites99.5%
Taylor expanded in t around 0
lower-*.f6454.5
Applied rewrites54.5%
Final simplification54.5%
(FPCore (x y z t) :precision binary64 (* (sqrt (* z 2.0)) (- y)))
double code(double x, double y, double z, double t) {
return sqrt((z * 2.0)) * -y;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = sqrt((z * 2.0d0)) * -y
end function
public static double code(double x, double y, double z, double t) {
return Math.sqrt((z * 2.0)) * -y;
}
def code(x, y, z, t): return math.sqrt((z * 2.0)) * -y
function code(x, y, z, t) return Float64(sqrt(Float64(z * 2.0)) * Float64(-y)) end
function tmp = code(x, y, z, t) tmp = sqrt((z * 2.0)) * -y; end
code[x_, y_, z_, t_] := N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * (-y)), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{z \cdot 2} \cdot \left(-y\right)
\end{array}
Initial program 98.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
unpow-prod-downN/A
associate-*l*N/A
*-commutativeN/A
pow1/2N/A
lift-exp.f64N/A
lift-/.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
pow1/2N/A
sqrt-unprodN/A
lower-sqrt.f64N/A
Applied rewrites99.5%
Taylor expanded in t around 0
lower-*.f6454.5
Applied rewrites54.5%
Taylor expanded in x around 0
mul-1-negN/A
lower-neg.f6429.4
Applied rewrites29.4%
Final simplification29.4%
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (pow (exp 1.0) (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * pow(exp(1.0), ((t * t) / 2.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * (exp(1.0d0) ** ((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.pow(Math.exp(1.0), ((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.pow(math.exp(1.0), ((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * (exp(1.0) ^ Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * (exp(1.0) ^ ((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[N[Exp[1.0], $MachinePrecision], N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot {\left(e^{1}\right)}^{\left(\frac{t \cdot t}{2}\right)}
\end{array}
herbie shell --seed 2024295
(FPCore (x y z t)
:name "Data.Number.Erf:$cinvnormcdf from erf-2.0.0.0, A"
:precision binary64
:alt
(! :herbie-platform default (* (* (- (* x 1/2) y) (sqrt (* z 2))) (pow (exp 1) (/ (* t t) 2))))
(* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))