<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 10.00.9200.16521"></HEAD>
<BODY 
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=485452313-18032013>Just got the attached request from someone implementing 
a decimal arithmetic library; I think it's a C/C++ question really.&nbsp; But 
I'm not sure where to 'point him to'.&nbsp; Any suggestions 
appreciated.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=485452313-18032013></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=485452313-18032013>Mike</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=485452313-18032013></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT color=#008080 size=2 face=Arial><SPAN 
class=485452313-18032013>The C++ decimal FP TR defines, well, everything, in 
terms of IEEE-754.<BR>&nbsp;Also operations like this: lhs == rhs where lhs or 
rhs are integers or binary FP types.&nbsp; I am trying to interpret IEEE-754 to 
see if it indeed defines such operations.&nbsp; (With a quick look I could not 
find.)</SPAN></FONT></DIV>
<DIV><FONT color=#008080></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT color=#008080 size=2 face=Arial><SPAN 
class=485452313-18032013>I have no problem defining the return value, however I 
am not sure if and what exceptions are to be raised?&nbsp; For example, if I 
compare a<BR>decimal32 to a double, and the double is larger that dec32_max, 
should I set overflow?&nbsp; (Because I have tried to convert the double 
to<BR>dec32.)&nbsp; Or perhaps I should set inexact, because I have tried to 
convert the Dec32 to double first, and it may not be exactly 
representable?</SPAN></FONT></DIV>
<DIV><FONT color=#008080></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT color=#008080 size=2 face=Arial><SPAN 
class=485452313-18032013>Could you give me a hint on what sections of the 
IEEE-754 I should read to find out those things?&nbsp; Thanks in advance.&nbsp; 
Oh, and feel free to tell me if I ask too 
much.<BR></SPAN></FONT></DIV></BODY></HTML>