Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

YukiRaven

Members
  • Content count

    4230
  • Joined

  • Last visited

About YukiRaven

  • Rank
    Will DDR for food

Recent Profile Visitors

14845 profile views

Single Status Update

See all updates by YukiRaven

  1. This is neat.  Kinda like Quake's fast isquare thingie minus the Newton's method stuff.  No C union needed, either.

     

    (defun faster-cube-root (n)
      "Not the most accurate way to do a cube root, but it's close enough.
       Adapted from http://www.hackersdelight.org/hdcodetxt/acbrt.c.txt"
    
      (ieee-floats:decode-float32
       ;;(+ #x2a51067f (truncate (* (ieee-floats:encode-float32 n) 0.33333333)))))
       (+ #x2a5137a0 (truncate (* (ieee-floats:encode-float32 n) 0.33333333)))))
    

     

×