It is currently Thu Oct 19, 2017 12:23 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Thu Mar 27, 2014 3:38 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19099
Location: NE Indiana, USA (NTSC)
"the determined Real Programmer can write Fortran programs in any language."
--Ed Post, Real Programmers Don't Use Pascal, 1982
http://www.pbm.com/~lindahl/real.programmers.html

This is a prototype of a base-100 floating point library that I plan to implement in 6502 assembly language. It treats a number as a 12-digit coefficient times 100 raised to a positive or negative power. The coefficient is stored as a sequence of six pairs of digits from 0 to 99.

Known limits as of today:
  • No sign bit (as my target application doesn't need negative and positive numbers in the same context)
  • No floating-point division or square root (likewise not needed for my app)
  • Ill-defined behavior on overflow during addition or multiplication when numbers exceed a quadragintillion (10^123)

Future:
  • Have some other smart people play with it to see what I messed up (that's you)
  • Rewrite in 6502 assembly, after which I'll have this topic moved to NESdev
  • Triangular and/or square roots, which I mentioned in a question on Stack Overflow

Download: floatypoint.py


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 6 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:  
Powered by phpBB® Forum Software © phpBB Group