<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Half seriously: Do we need FLOAT32, FLOAT64, FLOAT80, FLOAT128?<br>And some way to indicate what is available?<BR><br> <BR>On many/most/but-not-all modern 32bit x86 systems, "long double" is the<br>same as "double". Modula-3 is in agreement with many/most/but-not-all C systems.<BR> <BR><br>m3cc might be using x87 instructions on some platforms, at least sometimes.<br>But that doesn't change in-memory extended to other than 64 bits.<br>Just temporary in-register values might be 80 bits.<BR> <BR><br> - Jay<br><br><br> <BR><div><hr id="stopSpelling">Date: Sun, 31 May 2015 09:06:26 +1000<br>From: peter.mckinna@gmail.com<br>To: m3devel@elegosoft.com<br>Subject: [M3devel] extended<br><br><div dir="ltr">Hi<div><br></div><div> While we are on the subject of integer types can we diverge slightly to floating point types. I wonder if anyone can explain why the extended type is treated exactly the same as longreal in the frontend? They have the same sizes and ranges and precisions. </div><div> As for backends, at the moment m3cc is generating 8 byte sse instructions for both types. The llvm is generating 10 byte float instructions as per its x86fp80 type which are a fair bit slower at the expense of greater range and precision. However they are not interoperable with legacy libraries and we should probably change the type to agree with m3cc and the frontend.</div><div> It seems that the 8087 80 bit float is being phased out see <a href="http://csapp.cs.cmu.edu/2e/waside/waside-x87.pdf" target="_blank">http://csapp.cs.cmu.edu/2e/waside/waside-x87.pdf</a></div><div>so maybe the m3 implementors saw the writing on the wall and and decided to wait for hardware to catch up. Anyway I wonder if its worth considering making extended one of the 128 bit floating point types which although emulated in software would at least give us a different type and one which would give some applications a huge precision (and range ~10^4090) boost.</div><div><br></div><div>Peter</div></div></div> </div></body>
</html>