https://www.liquidpoker.net/


LP international    Contact            Users: 955 Active, 1 Logged in - Time: 11:24

Floating Arithmetic

New to LiquidPoker? Register here for free!
Forum Index > Poker Blogs
StArCuE   United States. Feb 06 2012 14:02. Posts 123
Alright I'm having trouble on this hw problem and would appreciate anyone who could help me out.

Problem A. The values of two float variables, x and y, are saved in IEEE single precision floating point format as below. Calculate the value of z in IEEE single precision floating point format if z = x + y.

x = 0 11100010 00101100000000000000000
y = 1 11100000 11010000000000000000000

I'm assuming I should start by calculating the 32-bit reps of x and y but I'm unsure what to do next. Any advice or step by step help would be appreciated. Thanks Chris.

0 votes
Facebook Twitter

bane   United States. Feb 06 2012 14:26. Posts 2379

http://www.h-schmidt.net/FloatApplet/IEEE754.html

but you should probably do it by hand when i learned that stuff that was a test problem


spets1   Australia. Feb 06 2012 15:05. Posts 2179

im pretty sure first number determines if its negative or positive.

i reckon convert into decimals and then add up and then convert bak to binary, but i havnt done this shit for years...

hola 

StArCuE   United States. Feb 06 2012 15:20. Posts 123

Ahhh right on thx for the link.


Silver_nz   New Zealand. Feb 06 2012 15:41. Posts 5647

good old IEEE754.
key is going to be understanding the formatting of these binary stream. pretty cool


Almebeast   Sweden. Feb 06 2012 17:56. Posts 797

Yeah the link explains it perfectly. Pretty interesting stuff imo.

After all is said and done, more is said than done. 

 



Poker Streams

















Copyright © 2024. LiquidPoker.net All Rights Reserved
Contact Advertise Sitemap