Average Error: 0.8 → 0.1
Time: 2.9s
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(\frac{1}{\sqrt{\log 10}}\right)}^{1.5}\right)\]
\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}
\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot {\left(\frac{1}{\sqrt{\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 (/ 1.0 (sqrt (log 10.0))) 1.5))))
double code(double re, double im) {
	return (((double) atan2(im, re)) / ((double) log(10.0)));
}
double code(double re, double im) {
	return ((double) (((double) sqrt((1.0 / ((double) sqrt(((double) log(10.0))))))) * ((double) (((double) atan2(im, re)) * ((double) pow((1.0 / ((double) sqrt(((double) log(10.0))))), 1.5))))));
}

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 Error: 0.8 bits

    \[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrtError: 0.8 bits

    \[\leadsto \frac{\tan^{-1}_* \frac{im}{re}}{\color{blue}{\sqrt{\log 10} \cdot \sqrt{\log 10}}}\]
  4. Applied *-un-lft-identityError: 0.8 bits

    \[\leadsto \frac{\color{blue}{1 \cdot \tan^{-1}_* \frac{im}{re}}}{\sqrt{\log 10} \cdot \sqrt{\log 10}}\]
  5. Applied times-fracError: 0.8 bits

    \[\leadsto \color{blue}{\frac{1}{\sqrt{\log 10}} \cdot \frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}}\]
  6. Using strategy rm
  7. Applied div-invError: 0.8 bits

    \[\leadsto \frac{1}{\sqrt{\log 10}} \cdot \color{blue}{\left(\tan^{-1}_* \frac{im}{re} \cdot \frac{1}{\sqrt{\log 10}}\right)}\]
  8. Using strategy rm
  9. Applied add-sqr-sqrtError: 0.8 bits

    \[\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 \frac{1}{\sqrt{\log 10}}\right)\]
  10. Applied associate-*l*Error: 0.8 bits

    \[\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 \frac{1}{\sqrt{\log 10}}\right)\right)}\]
  11. SimplifiedError: 0.1 bits

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

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

Reproduce

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