Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Terje Mathisen <terje.mathisen@tmsw.no> |
|---|---|
| Newsgroups | comp.arch |
| Subject | Re: t cluttered |
| Date | 2016-01-21 21:30 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <n7rf4s$1uo2$1@gioia.aioe.org> (permalink) |
| References | (11 earlier) <n7p8l0$nsa$1@dont-email.me> <n7q254$12jm$2@gioia.aioe.org> <a43728d0-42e3-422e-94b4-84813fd45efe@googlegroups.com> <b2c5b1d3-89e6-4f48-8756-18acb8ed4aa4@googlegroups.com> <b9ef2d5b-604d-4792-98cf-6409ec74d30e@googlegroups.com> |
already5chosen@yahoo.com wrote:
> I took a look in Itanium Software development manual at how they
> handle special cases. The answer is - with software assist, slowly.
> But detection of special case is fast and integrated into initial
> approximation of reciprocal.
This is the crucial difference between hw and sw fp implementations:
The actual calculations are relatively easy to emulate, the hard parts
are detecting and handling all the special cases!
Since I have spent significant time on sw emulation of IEEE FP
operations on small Mills now I feel competent to state that as long as
you have hw assists for those parts that are easy to do in hw but
complicated in sw (mostly manyway compare/branch logic) a modern cpu
with fast unsigned MUL can emulate the FP hardware with pretty
reasonable performance.
BTW, for detecting special cases I like the following logic:
bool is_special(double x)
{
uint64_t xi;
memcpy(xi, x, sizeof(x));
return ((xi + HIDDENBIT_VALUE) & ~SIGNBIT_VALUE <
HIDDENBIT_VALUE*2);
}
I.e. take the fp value as an unsigned integer, add 1 to the exponent
field and mask away the sign bit:
If the input is +/-Inf or NaN then the exp will wrap around to zero.
If x == +/-0 then we get a single 1 bit in the bottom of the exponent
and a zero mantissa.
If x == +/-Denorm then we have the same as above but a non-zero mantissa
All normal inputs result in a value >= 2 in the exponent field.
A hw helper can easily separate out all the special values in a single
cycle, without having to do any actual addition, mask or compare, just
checking for exp == 0 or exp == max, along with mant == 0.
Terje
--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"
Back to comp.arch | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Intel's Skylake Prime Number Bug. "Skybuck Flying" <skybuck2000@hotmail.com> - 2016-01-11 16:44 +0100
Re: Intel's Skylake Prime Number Bug. Larc <larc@notmyaddress.com> - 2016-01-11 11:10 -0500
Re: Intel's Skylake Prime Number Bug. "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-01-11 10:16 -0800
Re: Intel's Skylake Prime Number Bug. "Skybuck Flying" <skybuck2000@hotmail.com> - 2016-01-11 21:44 +0100
Re: Intel's Skylake Prime Number Bug. "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2016-01-11 13:06 -0800
Re: Intel's Skylake Prime Number Bug. "Skybuck Flying" <skybuck2000@hotmail.com> - 2016-01-12 16:35 +0100
Re: Intel's Skylake Prime Number Bug. DecadentLinuxUserNumeroUno <DLU1@DecadentLinuxUser.org> - 2016-01-12 12:53 -0500
Re: Intel's Skylake Prime Number Bug. Mark - <nonemail@spamspamapam.net> - 2016-01-12 20:00 +0000
Re: Intel's Skylake Prime Number Bug. Larc <larc@notmyaddress.com> - 2016-01-12 16:54 -0500
Re: Intel's Skylake Prime Number Bug. Mark - <nonemail@spamspamapam.net> - 2016-01-12 22:14 +0000
Re: Intel's Skylake Prime Number Bug. "wolfgang kern" <nowhere@never.at> - 2016-01-12 19:53 +0100
Re: Intel's Skylake Prime Number Bug. Paul <nospam@needed.com> - 2016-01-11 16:55 -0500
Re: Intel's Skylake Prime Number Bug. B00ze <B00ze64@hotmail.com> - 2016-01-11 23:48 -0500
Re: Intel's Skylake Prime Number Bug. John Larkin <jjlarkin@highlandtechnology.com> - 2016-01-11 10:22 -0800
Re: Intel's Skylake Prime Number Bug. Jerry Stuckle <jstucklex@attglobal.net> - 2016-01-11 13:42 -0500
Re: Intel's Skylake Prime Number Bug. John Larkin <jjlarkin@highlandtechnology.com> - 2016-01-11 11:12 -0800
Re: Intel's Skylake Prime Number Bug. David Brown <david.brown@hesbynett.no> - 2016-01-12 11:06 +0100
Re: Intel's Skylake Prime Number Bug. Richard Heathfield <rjh@cpax.org.uk> - 2016-01-12 10:21 +0000
Re: Intel's Skylake Prime Number Bug. David Brown <david.brown@hesbynett.no> - 2016-01-12 11:42 +0100
t cluttered John Larkin <jjlarkin@highlandtechnology.com> - 2016-01-12 09:25 -0800
Re: t cluttered David Brown <david.brown@hesbynett.no> - 2016-01-12 22:05 +0100
Re: t cluttered Ivan Godard <ivan@millcomputing.com> - 2016-01-12 14:03 -0800
Re: t cluttered Stephen Fuld <SFuld@alumni.cmu.edu.invalid> - 2016-01-12 21:44 -0800
Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-13 15:41 +0800
Re: t cluttered krw <krw@nowhere.com> - 2016-01-13 21:39 -0500
Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-13 00:52 -0800
Re: t cluttered already5chosen@yahoo.com - 2016-01-13 02:39 -0800
Re: t cluttered Rick Jones <rick.jones2@hpe.com> - 2016-01-12 22:41 +0000
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-12 23:01 +0000
Re: t cluttered Ivan Godard <ivan@millcomputing.com> - 2016-01-12 16:16 -0800
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-13 10:35 +0000
Re: t cluttered Anonymous <no_email@invalid.invalid> - 2016-01-13 14:36 +0000
Re: t cluttered Robert Wessel <robertwessel2@yahoo.com> - 2016-01-14 02:48 -0600
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-14 10:50 +0000
Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-14 05:25 -0800
Re: t cluttered Bruce Hoult <bruce.hoult@gmail.com> - 2016-01-14 07:23 -0800
Re: t cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-14 09:17 -0700
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-14 16:30 +0000
Re: t cluttered Bruce Hoult <bruce.hoult@gmail.com> - 2016-01-14 12:02 -0800
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-14 21:22 +0000
Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-15 10:06 +0800
Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-15 09:48 +0800
Re: t cluttered Bruce Hoult <bruce.hoult@gmail.com> - 2016-01-14 11:57 -0800
Re: t cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-14 19:16 -0700
Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-14 08:29 -0800
Re: t cluttered Bruce Hoult <bruce.hoult@gmail.com> - 2016-01-14 12:13 -0800
Re: t cluttered Stephen Fuld <SFuld@alumni.cmu.edu.invalid> - 2016-01-14 12:24 -0800
Re: t cluttered Bruce Hoult <bruce.hoult@gmail.com> - 2016-01-14 12:48 -0800
Re: t cluttered Stephen Fuld <SFuld@alumni.cmu.edu.invalid> - 2016-01-14 13:06 -0800
Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-15 10:14 +0800
Re: t cluttered anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-15 14:33 +0000
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-16 09:39 +0000
Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-17 00:15 +0800
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-16 19:24 +0000
Re: t cluttered Ivan Godard <ivan@millcomputing.com> - 2016-01-16 12:18 -0800
Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-17 17:46 +0800
Re: t cluttered Ivan Godard <ivan@millcomputing.com> - 2016-01-17 02:53 -0800
Re: t cluttered Stefan Monnier <monnier@iro.umontreal.ca> - 2016-01-18 12:20 -0500
Re: t cluttered paul wallich <pw@panix.com> - 2016-01-18 14:42 -0500
Re: t cluttered Erik Trulsson <erikt@Update.UU.SE> - 2016-01-19 13:05 +0000
Re: t cluttered paul wallich <pw@panix.com> - 2016-01-19 08:29 -0500
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-19 13:48 +0000
Re: t cluttered anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-19 17:04 +0000
Re: t cluttered already5chosen@yahoo.com - 2016-01-19 10:27 -0800
Re: t cluttered David Brown <david.brown@hesbynett.no> - 2016-01-20 11:30 +0100
Re: t cluttered already5chosen@yahoo.com - 2016-01-20 03:55 -0800
Re: t cluttered David Brown <david.brown@hesbynett.no> - 2016-01-20 15:17 +0100
Re: t cluttered already5chosen@yahoo.com - 2016-01-20 07:15 -0800
Re: t cluttered anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-20 16:17 +0000
Re: t cluttered EricP <ThatWouldBeTelling@thevillage.com> - 2016-01-19 15:37 -0500
Re: t cluttered anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-16 16:46 +0000
Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-16 10:10 -0800
Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-16 10:11 -0800
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-16 19:42 +0000
Re: t cluttered anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-17 17:51 +0000
Re: t cluttered rpw3@rpw3.org (Rob Warnock) - 2016-01-17 08:21 +0000
Re: t cluttered anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-17 17:41 +0000
Re: t cluttered Melzzzzz <mel@zzzzz.com> - 2016-01-17 20:03 +0100
Re: t cluttered rpw3@rpw3.org (Rob Warnock) - 2016-01-18 12:13 +0000
Re: t cluttered anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-18 14:24 +0000
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-18 14:40 +0000
Re: t cluttered Megol <golem960@gmail.com> - 2016-01-16 06:25 -0800
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-16 15:09 +0000
Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-17 00:21 +0800
Re: t cluttered anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-16 16:34 +0000
Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-14 08:33 -0800
Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-15 09:38 +0800
Re: t cluttered jgk@panix.com (Joe keane) - 2016-01-17 19:25 +0000
Re: t cluttered already5chosen@yahoo.com - 2016-01-17 11:38 -0800
Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-17 14:21 -0800
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-17 23:21 +0000
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-14 16:29 +0000
Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-14 08:39 -0800
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-14 16:45 +0000
Re: t cluttered already5chosen@yahoo.com - 2016-01-14 11:35 -0800
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-14 21:32 +0000
Re: t cluttered MitchAlsup <MitchAlsup@aol.com> - 2016-01-14 15:08 -0800
Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-14 20:21 -0800
Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-14 20:20 -0800
Re: t cluttered anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-14 16:48 +0000
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-14 18:05 +0000
Re: t cluttered anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-15 10:17 +0000
Re: t cluttered Ivan Godard <ivan@millcomputing.com> - 2016-01-13 11:54 -0800
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-13 20:41 +0000
Re: t cluttered MitchAlsup <MitchAlsup@aol.com> - 2016-01-13 17:57 -0800
Re: t cluttered mrs@kithrup.com (Mike Stump) - 2016-01-18 13:37 +0000
Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-19 00:06 +0800
Re: t cluttered Ivan Godard <ivan@millcomputing.com> - 2016-01-18 15:27 -0800
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-19 09:43 +0000
Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-19 18:00 +0800
Re: t cluttered already5chosen@yahoo.com - 2016-01-19 02:47 -0800
Re: t cluttered Bruce Hoult <bruce.hoult@gmail.com> - 2016-01-19 03:01 -0800
Re: t cluttered already5chosen@yahoo.com - 2016-01-19 04:43 -0800
Re: t cluttered jgk@panix.com (Joe keane) - 2016-01-21 17:35 +0000
Re: t cluttered Stefan Monnier <monnier@iro.umontreal.ca> - 2016-01-21 14:45 -0500
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-22 09:49 +0000
Re: hashes and b-trees, was't cluttered John Levine <johnl@iecc.com> - 2016-01-22 16:53 +0000
Re: hashes and b-trees, was't cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-22 10:34 -0700
Re: hashes and b-trees, was't cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-22 18:00 +0000
Re: t cluttered Stefan Monnier <monnier@iro.umontreal.ca> - 2016-01-25 14:03 -0500
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-25 19:57 +0000
Re: t cluttered Bruce Hoult <bruce.hoult@gmail.com> - 2016-01-26 00:17 -0800
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-26 10:00 +0000
Re: t cluttered jgk@panix.com (Joe keane) - 2016-01-23 18:59 +0000
Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-19 19:28 +0700
Re: t cluttered already5chosen@yahoo.com - 2016-01-19 15:41 -0800
Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-20 15:20 +0100
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-19 11:25 +0000
Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-19 19:48 +0700
Re: t cluttered Walter Banks <walter@bytecraft.com> - 2016-01-19 09:54 -0500
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-19 16:49 +0000
Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-19 17:25 -0800
Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-19 17:43 -0800
Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-20 14:52 +0100
Re: t cluttered already5chosen@yahoo.com - 2016-01-19 02:14 -0800
Re: t cluttered Ivan Godard <ivan@millcomputing.com> - 2016-01-19 02:33 -0800
Re: t cluttered already5chosen@yahoo.com - 2016-01-19 02:57 -0800
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-19 11:34 +0000
Re: t cluttered already5chosen@yahoo.com - 2016-01-19 05:24 -0800
Re: t cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-19 15:46 -0700
Re: t cluttered already5chosen@yahoo.com - 2016-01-19 16:14 -0800
Re: t cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-19 18:37 -0700
Re: t cluttered already5chosen@yahoo.com - 2016-01-20 03:32 -0800
Re: t cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-20 11:04 -0700
Re: t cluttered Melzzzzz <mel@zzzzz.com> - 2016-01-20 06:56 +0100
Re: t cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-20 00:55 -0700
Re: t cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-20 01:27 -0700
Re: t cluttered Melzzzzz <mel@zzzzz.com> - 2016-01-20 13:55 +0100
Re: t cluttered already5chosen@yahoo.com - 2016-01-20 08:50 -0800
Re: t cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-20 11:34 -0700
Re: t cluttered already5chosen@yahoo.com - 2016-01-20 11:13 -0800
Re: t cluttered already5chosen@yahoo.com - 2016-01-20 15:15 -0800
Re: t cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-20 17:29 -0700
Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-21 08:42 +0100
Re: t cluttered already5chosen@yahoo.com - 2016-01-21 03:15 -0800
Re: t cluttered already5chosen@yahoo.com - 2016-01-21 05:03 -0800
Re: t cluttered Quadibloc <jsavard@ecn.ab.ca> - 2016-01-21 06:42 -0800
Re: t cluttered already5chosen@yahoo.com - 2016-01-21 07:45 -0800
Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-21 21:30 +0100
Re: t cluttered MitchAlsup <MitchAlsup@aol.com> - 2016-01-21 16:17 -0800
Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-22 07:57 +0100
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-22 13:18 +0000
Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-22 14:51 +0100
Re: t cluttered nmm@wheeler.UUCP (Nick Maclaren) - 2016-01-22 14:14 +0000
Re: t cluttered already5chosen@yahoo.com - 2016-01-22 05:52 -0800
Re: t cluttered already5chosen@yahoo.com - 2016-01-22 06:33 -0800
Re: t cluttered "James Van Buskirk" <not_valid@comcast.net> - 2016-01-22 10:48 -0700
Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-22 19:30 +0100
Re: t cluttered already5chosen@yahoo.com - 2016-01-21 02:18 -0800
Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-19 19:10 +0700
Re: t cluttered MitchAlsup <MitchAlsup@aol.com> - 2016-01-19 06:35 -0800
Re: t cluttered Ivan Godard <ivan@millcomputing.com> - 2016-01-19 10:49 -0800
Re: t cluttered krw <krw@nowhere.com> - 2016-01-12 20:53 -0500
Re: t cluttered Dennis <dennis@none.none> - 2016-01-13 14:56 -0600
Re: t cluttered krw <krw@nowhere.com> - 2016-01-13 21:43 -0500
Re: t cluttered Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-13 13:24 +0800
Re: t cluttered upsidedown@downunder.com - 2016-01-13 10:15 +0200
Re: Intel's Skylake Prime Number Bug. JJ <jj4public@vfemail.net> - 2016-01-12 13:11 +0700
Re: Intel's Skylake Prime Number Bug. "Tom Del Rosso" <fizzbintuesday@that-google-mail-domain.com> - 2016-01-12 02:45 -0500
Re: Intel's Skylake Prime Number Bug. Paul <nospam@needed.com> - 2016-01-12 04:38 -0500
Re: Intel's Skylake Prime Number Bug. MitchAlsup <MitchAlsup@aol.com> - 2016-01-12 06:33 -0800
Re: Intel's Skylake Prime Number Bug. krw <krw@nowhere.com> - 2016-01-12 12:35 -0500
Re: Intel's Skylake Prime Number Bug. EricP <ThatWouldBeTelling@thevillage.com> - 2016-01-11 14:33 -0500
Re: Intel's Skylake Prime Number Bug. Casper H.S. Dik <Casper.Dik@OrSPaMcle.COM> - 2016-01-12 17:27 +0000
Re: Intel's Skylake Prime Number Bug. Quadibloc <jsavard@ecn.ab.ca> - 2016-01-11 13:54 -0800
Re: Intel's Skylake Prime Number Bug. Martin Brown <|||newspam|||@nezumi.demon.co.uk> - 2016-01-11 22:21 +0000
Re: Intel's Skylake Prime Number Bug. krw <krw@nowhere.com> - 2016-01-11 21:38 -0500
Re: Intel's Skylake Prime Number Bug. krw <krw@nowhere.com> - 2016-01-11 21:37 -0500
Re: Intel's Skylake Prime Number Bug. Robert Baer <robertbaer@localnet.com> - 2016-01-12 20:23 -0800
Re: Intel's Skylake Prime Number Bug. John Levine <johnl@iecc.com> - 2016-01-13 05:19 +0000
Re: Intel's Skylake Prime Number Bug. already5chosen@yahoo.com - 2016-01-13 01:55 -0800
Re: Intel's Skylake Prime Number Bug. Keith Thompson <kst-u@mib.org> - 2016-01-11 23:46 -0800
csiph-web