<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - ARM long double arithmetic done wrong"
href="https://bugs.llvm.org/show_bug.cgi?id=46802">46802</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ARM long double arithmetic done wrong
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>10.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>tydeman@tybor.com
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>/*
* Signed zero long double bug. All output should be +inf.
*/
#include <fenv.h>
#include <stdio.h>
static long double ld_P0 = +0.L;
static long double ld_M0 = -0.L;
static long double ld_pone = +1.L;
int main(void){
long double ld23;
int rnd_rc;
(void)printf("ld_M0=%Lg, ld_pone=%Lg\n", ld_M0, ld_pone);
ld23 = ld_P0 + ld_P0*ld_pone;
(void)printf("1/ld23=%Lg\n", 1.L/ld23);
ld23 = -ld_M0 - ld_M0*ld_pone;
(void)printf("1/ld23=%Lg\n", 1.L/ld23);
rnd_rc = fesetround( FE_DOWNWARD );
ld23 = ld_P0 + ld_P0*ld_pone;
(void)printf("1/ld23=%Lg\n", 1.L/ld23);
ld23 = -ld_M0 - ld_M0*ld_pone; /* bug */
(void)printf("1/ld23=%Lg\n", 1.L/ld23);
return 0;
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>