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

Remilia Scarlet

Members
  • Content count

    4264
  • Joined

  • Last visited

About Remilia Scarlet

  • Rank
    Will DDR for food

Recent Profile Visitors

19612 profile views

Single Status Update

See all updates by Remilia Scarlet

  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)))))
    

     

×