MaxCoderz

for your 1 bit pleasure!

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Tue 26 Jun, 2007 4:02 pm 
Offline
Calc King

Joined: Sat 05 Aug, 2006 7:22 am
Posts: 1513
did you know that the exponent + the fraction (excluding the implicit bit) comes really close to the base2 logarithm of the whole number?
the error is highest when the represented number is pow(2,n)-1 and lowest (zero) when the represented number is pow(2,n)
funny thing isn't it? this makes for a fast (if a little inaccurate) base2 logarithmic calculation, ADD. Changing the base to a known number only takes an additional DIVIDE.
error (top is 0.1, numbers range from 1 through 10240)
Image

probably only for positive numbers


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB ® Forum Software © phpBB Group | DVGFX2 by: Matt