A computer components & hardware forum. HardwareBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » HardwareBanter forum » Processors » General
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Transcendental floating point functions are now unfixably brokenon Intel processors



 
 
Thread Tools Display Modes
  #1  
Old January 22nd 15, 01:27 AM posted to comp.sys.ibm.pc.hardware.chips
[email protected]
external usenet poster
 
Posts: 2
Default Transcendental floating point functions are now unfixably brokenon Intel processors

On Friday, October 10, 2014 at 6:58:43 AM UTC-4, Yousuf Khan wrote:
" This error has tragically become un-fixable because of the
compatibility requirements from one generation to the next. The fix for
this problem was figured out quite a long time ago. In the excellent
paper The K5 transcendental functions by T. Lynch, A. Ahmed, M. Schulte,
T. Callaway, and R. Tisdale a technique is described for doing argument
reduction as if you had an infinitely precise value for pi. As far as I
know, the K5 is the only x86 family CPU that did sin/cos accurately. AMD
went back to being bit-for-bit compatibile with the old x87 behavior,
assumably because too many applications broke. Oddly enough, this is
fixed in Itanium.

What we do in the JVM on x86 is moderately obvious: we range check the
argument, and if it's outside the range [-pi/4, pi/4]we do the precise
range reduction by hand, and then call fsin.

So Java is accurate, but slower. I've never been a fan of "fast, but
wrong" when "wrong" is roughly random(). Benchmarks rarely test
accuracy. "double sin(double theta) { return 0; }" would be a great
benchmark-compatible implementation of sin(). For large values of theta,
0 would be arguably more accurate since the absolute error is never
greater than 1. fsin/fcos can have absolute errors as large as 2
(correct answer=1; returned result=-1). "

https://blogs.oracle.com/jag/entry/t...tal_meditation


Wow, you're still here. I haven't peeked at comp.chips in years, maybe a decade. Is Keith / KRW still around? I haven't seen or heard from him since he retired. I see John Corse is still around, same-old-same-old.

To be on-topic, it's interesting to see the transcendentals broken on Intel.. I'm looking into AMD's HSA, and though the math can be double-precision, I'd heard that transcendentals were fudged single-precision. I'd thought of Intel as the gold standard on this, at least after the integer bruising was fixed.

Oops.
  #2  
Old January 22nd 15, 05:25 AM posted to comp.sys.ibm.pc.hardware.chips
Yousuf Khan[_2_]
external usenet poster
 
Posts: 1,296
Default Transcendental floating point functions are now unfixably brokenon Intel processors

On 21/01/2015 7:27 PM, wrote:
Wow, you're still here. I haven't peeked at comp.chips in years,
maybe a decade. Is Keith / KRW still around? I haven't seen or
heard from him since he retired. I see John Corse is still around,
same-old-same-old.


Yeah, I check into it from time to time. At least it's still on my
newsgroups list. After it's done filtering out all of the spam, I might
see one posting in 3 months here on average.

To be on-topic, it's interesting to see the transcendentals broken
on Intel. I'm looking into AMD's HSA, and though the math can be
double-precision, I'd heard that transcendentals were fudged
single-precision. I'd thought of Intel as the gold standard on
this, at least after the integer bruising was fixed.


I think these days the transcendentals are all emulated in software
anyhow, so the precision now depends on how bug-free the floating point
libraries are, not now bug-free the hardware microcode is. AMD64 has
gotten rid of the x87 floating point unit, it's completely replaced by
the SSE2 and higher system, so it's not an option to use the hardware
transcendentals, since trancendentals are not part of the SSE specs. All
higher level floating point functions are now carried out by software.
So in a sense, the RISC idea of keeping complex functions to minimum has
won out, at least in the floating point side of x86.

Yousuf Khan
  #3  
Old January 23rd 15, 12:57 AM posted to comp.sys.ibm.pc.hardware.chips
[email protected]
external usenet poster
 
Posts: 12
Default Transcendental floating point functions are now unfixably broken on Intel processors

On Wed, 21 Jan 2015 16:27:58 -0800 (PST), wrote:

On Friday, October 10, 2014 at 6:58:43 AM UTC-4, Yousuf Khan wrote:
" This error has tragically become un-fixable because of the
compatibility requirements from one generation to the next. The fix for
this problem was figured out quite a long time ago. In the excellent
paper The K5 transcendental functions by T. Lynch, A. Ahmed, M. Schulte,
T. Callaway, and R. Tisdale a technique is described for doing argument
reduction as if you had an infinitely precise value for pi. As far as I
know, the K5 is the only x86 family CPU that did sin/cos accurately. AMD
went back to being bit-for-bit compatibile with the old x87 behavior,
assumably because too many applications broke. Oddly enough, this is
fixed in Itanium.

What we do in the JVM on x86 is moderately obvious: we range check the
argument, and if it's outside the range [-pi/4, pi/4]we do the precise
range reduction by hand, and then call fsin.

So Java is accurate, but slower. I've never been a fan of "fast, but
wrong" when "wrong" is roughly random(). Benchmarks rarely test
accuracy. "double sin(double theta) { return 0; }" would be a great
benchmark-compatible implementation of sin(). For large values of theta,
0 would be arguably more accurate since the absolute error is never
greater than 1. fsin/fcos can have absolute errors as large as 2
(correct answer=1; returned result=-1). "

https://blogs.oracle.com/jag/entry/t...tal_meditation

Wow, you're still here. I haven't peeked at comp.chips in years, maybe a decade. Is Keith / KRW still around? I haven't seen or heard from him since he retired. I see John Corse is still around, same-old-same-old.


Hi Dale,

I'm still "around" but there hasn't been much activity here for a
decade or so. Oh, and I'm un-retired. Completely different industry,
though. ...doing mostly analog design. ;-)


To be on-topic, it's interesting to see the transcendentals broken on Intel. I'm looking into AMD's HSA, and though the math can be double-precision, I'd heard that transcendentals were fudged single-precision. I'd thought of Intel as the gold standard on this, at least after the integer bruising was fixed.

Oops.

  #9  
Old January 29th 15, 02:13 AM posted to comp.sys.ibm.pc.hardware.chips
[email protected]
external usenet poster
 
Posts: 12
Default Transcendental floating point functions are now unfixably broken on Intel processors

On Tue, 27 Jan 2015 21:23:06 -0500, Yousuf Khan
wrote:

On 27/01/2015 6:42 PM, wrote:
On Tue, 27 Jan 2015 14:11:51 -0500, Yousuf Khan
wrote:
Well, if I trace back my current desktop, it can be trace it all of the
way back to my first ever 8088 PC-XT clone. It's been upgraded
continuously ever since, component by component.


The difference is that my Opteron system has never been upgraded. It
holds down the floor just as well as it did 12 years ago. It uses a
lot less power, these days, though.


Well, I still use my desktop daily, it's my most used computer. It's
also scheduled for its next mini-upgrade in a few days or weeks. I'm
going to be installing a water cooler to it, and then I'm going to be
overclocking it. The current system is using a Phenom II X6 1100T, which
is overclocking-ready. I did overclock it slightly back when I first got
it, using its stock cooler. I did not really need the extra speed and
decided to keep it at stock speed. I'm expecting that if I overclock it
with water, I should be good with this current processor for another 2
years or so.


I have *many* things that take up my time other than upgrading
computers. I got out of that completely when I bought my first
laptop. Computers have gotten boring. They're just another tool.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Transcendental floating point functions are now unfixably brokenon Intel processors Yousuf Khan[_2_] Homebuilt PC's 3 October 20th 14 11:27 AM
128-bit floating Point YANSWBVCG[_2_] AMD x86-64 Processors 0 December 24th 07 07:20 PM
floating point speed compare of AMD and Intel chips Bob Fry AMD x86-64 Processors 3 October 22nd 07 04:25 PM
Examining Intel's Woodcrest performance claims on TPC-C, Floating point, Integer, Java, Web, HPC and application sharikou AMD x86-64 Processors 0 June 8th 06 10:26 PM
Floating point format for Intel math coprocessors Dave Hansen Intel 26 July 6th 03 10:22 AM


All times are GMT +1. The time now is 03:23 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 HardwareBanter.
The comments are property of their posters.