Average Error: 0.9 → 0.1
Time: 4.0s
Precision: binary64
\[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10} \]
\[\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot {\left(\sqrt{\frac{1}{\log 10}}\right)}^{1.5}\right) \]
(FPCore (re im) :precision binary64 (/ (atan2 im re) (log 10.0)))
(FPCore (re im)
 :precision binary64
 (*
  (sqrt (/ 1.0 (sqrt (log 10.0))))
  (* (atan2 im re) (pow (sqrt (/ 1.0 (log 10.0))) 1.5))))
double code(double re, double im) {
	return atan2(im, re) / log(10.0);
}
double code(double re, double im) {
	return sqrt((1.0 / sqrt(log(10.0)))) * (atan2(im, re) * pow(sqrt((1.0 / log(10.0))), 1.5));
}
real(8) function code(re, im)
    real(8), intent (in) :: re
    real(8), intent (in) :: im
    code = atan2(im, re) / log(10.0d0)
end function
real(8) function code(re, im)
    real(8), intent (in) :: re
    real(8), intent (in) :: im
    code = sqrt((1.0d0 / sqrt(log(10.0d0)))) * (atan2(im, re) * (sqrt((1.0d0 / log(10.0d0))) ** 1.5d0))
end function
public static double code(double re, double im) {
	return Math.atan2(im, re) / Math.log(10.0);
}
public static double code(double re, double im) {
	return Math.sqrt((1.0 / Math.sqrt(Math.log(10.0)))) * (Math.atan2(im, re) * Math.pow(Math.sqrt((1.0 / Math.log(10.0))), 1.5));
}
def code(re, im):
	return math.atan2(im, re) / math.log(10.0)
def code(re, im):
	return math.sqrt((1.0 / math.sqrt(math.log(10.0)))) * (math.atan2(im, re) * math.pow(math.sqrt((1.0 / math.log(10.0))), 1.5))
function code(re, im)
	return Float64(atan(im, re) / log(10.0))
end
function code(re, im)
	return Float64(sqrt(Float64(1.0 / sqrt(log(10.0)))) * Float64(atan(im, re) * (sqrt(Float64(1.0 / log(10.0))) ^ 1.5)))
end
function tmp = code(re, im)
	tmp = atan2(im, re) / log(10.0);
end
function tmp = code(re, im)
	tmp = sqrt((1.0 / sqrt(log(10.0)))) * (atan2(im, re) * (sqrt((1.0 / log(10.0))) ^ 1.5));
end
code[re_, im_] := N[(N[ArcTan[im / re], $MachinePrecision] / N[Log[10.0], $MachinePrecision]), $MachinePrecision]
code[re_, im_] := N[(N[Sqrt[N[(1.0 / N[Sqrt[N[Log[10.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[ArcTan[im / re], $MachinePrecision] * N[Power[N[Sqrt[N[(1.0 / N[Log[10.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}
\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot {\left(\sqrt{\frac{1}{\log 10}}\right)}^{1.5}\right)

Error

Bits error versus re

Bits error versus im

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.9

    \[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10} \]
  2. Applied add-sqr-sqrt_binary640.9

    \[\leadsto \frac{\tan^{-1}_* \frac{im}{re}}{\color{blue}{\sqrt{\log 10} \cdot \sqrt{\log 10}}} \]
  3. Applied *-un-lft-identity_binary640.9

    \[\leadsto \frac{\color{blue}{1 \cdot \tan^{-1}_* \frac{im}{re}}}{\sqrt{\log 10} \cdot \sqrt{\log 10}} \]
  4. Applied times-frac_binary640.8

    \[\leadsto \color{blue}{\frac{1}{\sqrt{\log 10}} \cdot \frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}} \]
  5. Taylor expanded in im around 0 0.8

    \[\leadsto \frac{1}{\sqrt{\log 10}} \cdot \color{blue}{\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right)} \]
  6. Applied add-sqr-sqrt_binary640.8

    \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \sqrt{\frac{1}{\sqrt{\log 10}}}\right)} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right) \]
  7. Applied associate-*l*_binary640.8

    \[\leadsto \color{blue}{\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \left(\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right)\right)} \]
  8. Simplified0.1

    \[\leadsto \sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \color{blue}{\left(\tan^{-1}_* \frac{im}{re} \cdot {\left(\sqrt{\frac{1}{\log 10}}\right)}^{1.5}\right)} \]
  9. Final simplification0.1

    \[\leadsto \sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot {\left(\sqrt{\frac{1}{\log 10}}\right)}^{1.5}\right) \]

Reproduce

herbie shell --seed 2022131 
(FPCore (re im)
  :name "math.log10 on complex, imaginary part"
  :precision binary64
  (/ (atan2 im re) (log 10.0)))