From the course: Learning Assembly Language

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Working with floating point

Working with floating point - Python Tutorial

From the course: Learning Assembly Language

Start my 1-month free trial

Working with floating point

- [Instructor] The x86-64 bit chip has the built-in capability to operate on floating point numbers. These can be either single precision, four byte values double precision, eight byte values, and even extended precision of 10 bytes. The chip also supports a floating point stack which we'll be using. For the purposes of getting an understanding of floating point, we'll work with double precision. There's a reasonable amount of code here so I prepared it in advance. At lines three to nine we're declaring some working data, including a string that we'll use to display our values. At lines 10 to 13, we have four variables, rval one to four, initialized to be floating point or real numbers. We declare these, as codewords. We've included in the initial code at lines 19 and 20 a call to get the console output handle, which we store in hout. We'll use this to show the output of our calculations In order to be able to…

Contents