🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Jay Zipnick Sat, 02 Mar 1996 16:04
<fp.h> & double_t/float_t
#3595
Author: Jay Zipnick
Date: Sat, 02 Mar 1996 16:04
37 lines
2034 bytes
Back in 1992, I was taught a "better and more portable" way of writing a
numerical algorithm I was working on. I was primarily interested in speed,
but I needed the precision of at least a double, and was not sure whether
to use a double or a long double, since my code may run on different
processors, and on one, long double was the fastest, and on another double
was the fastest. I was told use neither! Use double_t.

Specifically, I was told:

- double_t is guaranteed to be the fastest floating point type, for your
implementation, that is at least the size of a double.

- also there exists a typedef named float_t, which provides the fastest
floating point type, (float, double, long double), for your
implementation, that is at least the size of a float.

- start using the new standard header <fp.h>, which is where float_t and
double_t are defined.

This was then, I believe, the emerging standard from the Numerical C
Extensions Group.

Now it is 1996. Has there been any changes with respect to the three
points above? I did not see any references to float_t, double_t, or <fp.h>
in the April draft.

Please also reply to jzipnick@best.com.

Jay Zipnick


[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads