<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 23, 2014, at 3:57 PM, Hal Finkel <<a href="mailto:hfinkel@anl.gov" class="">hfinkel@anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">----- Original Message -----</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">From: "Hal Finkel" <<a href="mailto:hfinkel@anl.gov" class="">hfinkel@anl.gov</a>><br class="">To: "Stephen Canon" <<a href="mailto:scanon@apple.com" class="">scanon@apple.com</a>><br class="">Cc:<span class="Apple-converted-space"> </span><a href="mailto:llvm-commits@cs.uiuc.edu" class="">llvm-commits@cs.uiuc.edu</a>,<span class="Apple-converted-space"> </span><a href="mailto:spatel@rotateright.com" class="">spatel@rotateright.com</a>,<span class="Apple-converted-space"> </span><a href="mailto:beanz@apple.com" class="">beanz@apple.com</a>,<br class=""><a href="mailto:reviews+D5919+public+763adead774985f1@reviews.llvm.org" class="">reviews+D5919+public+763adead774985f1@reviews.llvm.org</a><br class="">Sent: Thursday, October 23, 2014 2:51:34 PM<br class="">Subject: Re: [PATCH] Handle sqrt() shrinking in SimplifyLibCalls like any other call<br class=""><br class="">----- Original Message -----<br class=""><blockquote type="cite" class="">From: "Stephen Canon" <<a href="mailto:scanon@apple.com" class="">scanon@apple.com</a>><br class="">To: "Hal Finkel" <<a href="mailto:hfinkel@anl.gov" class="">hfinkel@anl.gov</a>><br class="">Cc: <a href="mailto:llvm-commits@cs.uiuc.edu" class="">llvm-commits@cs.uiuc.edu</a>, <a href="mailto:spatel@rotateright.com" class="">spatel@rotateright.com</a>,<br class=""><a href="mailto:beanz@apple.com" class="">beanz@apple.com</a>,<br class=""><a href="mailto:reviews+D5919+public+763adead774985f1@reviews.llvm.org" class="">reviews+D5919+public+763adead774985f1@reviews.llvm.org</a><br class="">Sent: Thursday, October 23, 2014 2:46:17 PM<br class="">Subject: Re: [PATCH] Handle sqrt() shrinking in SimplifyLibCalls<br class="">like any other call<br class=""><br class="">(float)sqrt((double)x) —> sqrtf(x) is a valid transformation [See<br class="">Sam<br class="">Figueroa’s thesis for details].<br class=""></blockquote><br class="">Does this assume that the sqrtf is correct to <= 0.5ulps?<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">I suppose that C99 F.3 does say that, "The sqrt functions in <math.h> provide the IEC 60559 square root operation.", so perhaps this is a safe assumption on a compliant system.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Alright, Sanjay, go ahead. You're not actually changing anything. ;)</span></div></blockquote><br class=""></div><div>Yeah, I would say that a system without a correctly rounded sqrtf is broken.  (But: Annex F is not required).</div></body></html>