flat assembler
Message board for the users of flat assembler.

 Index > Heap > is floating, decimal necessary?
Author
sleepsleep

Joined: 05 Oct 2006
Posts: 8904
Location: ˛　　　　　　　　　　　　　　　　　　　　　　　　　　　　　⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
if a division would break a number into decimal, does it make it a number still?

3/9 = 0.333333333

if 1 cm = 10mm
and 0.1cm = 1mm

then why the need of decimal, we could just invent another "type" that basically x10, x1000, x100000

or the exists of decimal is mainly to cater for division?
22 Jun 2011, 03:50
typedef

Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
well, .05 is not 5.00 is it?
22 Jun 2011, 07:40
vid
Verbosity in development

Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
That's exactly what "floating point number" is. It consists of two whole numbers: Exponent, which is the "floating" decimal point (Eg. x10, x1000, x100000), and mantissa. So for example, 15.356 is 15356e-3, eg. mantissa 15356 and exponent -3 (but of course this is in binary, not decimal).
22 Jun 2011, 07:41
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

 Jump to: Select a forum Official----------------AssemblyPeripheria General----------------MainDOSWindowsLinuxUnixMenuetOS Specific----------------MacroinstructionsCompiler InternalsIDE DevelopmentOS ConstructionNon-x86 architecturesHigh Level LanguagesProgramming Language DesignProjects and IdeasExamples and Tutorials Other----------------FeedbackHeapTest Area

Forum Rules:
 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou can attach files in this forumYou can download files in this forum