473,396 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Lies of Billy Gates of Microcrap

Can someone please translate this MS lie language into
ordinary logical English language.
I need a "long double" data type that is capable to hold
bigger numbers than the normal "double" type can hold.
Has MS' crappy compiler VC6 implemented this data type or not?
What is your understanding from the citations below from the MS' 'documentation',
and/or your own practical experience regarding this?

"Type long double
The long double contains 80 bits: 1 for sign, 15 for exponent,
and 64 for mantissa. Its range is +/-1.2E4932 with at least 19 digits of precision.
Although long double and double are separate types,
the representation of long double and double is identical."

"double
Type double is a floating type that is larger than or equal to type float,
but shorter than or equal to the size of type long double [-->1]

long double [-->1]
Type long double is a floating type that is equal to type double.

[1] The representation of long double and double is identical.
However, long double and double are separate types."

"Table 3.2 Sizes of Fundamental Types
...
float 4 bytes
double 8 bytes
long double 8 bytes"

Jun 28 '08 #1
13 1660

"long double" <lo*********@long-double.com.invalidwrote in message news:
>
Can someone please translate this MS lie language into
ordinary logical English language.
I need a "long double" data type that is capable to hold
bigger numbers than the normal "double" type can hold.
Has MS' crappy compiler VC6 implemented this data type or not?
What is your understanding from the citations below from the MS'
documentation', and/or your own practical experience regarding this?
Why do you need numbers larger than

1.798e+308 ?

What are you measuring?

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm
Jun 28 '08 #2
long double wrote:
>
.... snip ...
Has MS' crappy compiler VC6 implemented this data type or not?
What is your understanding from the citations below from the MS'
'documentation', and/or your own practical experience regarding
this?

"Type long double
The long double contains 80 bits: 1 for sign, 15 for exponent,
and 64 for mantissa. Its range is +/-1.2E4932 with at least 19
digits of precision.
.... snip ...
>
"Table 3.2 Sizes of Fundamental Types
...
float 4 bytes
double 8 bytes
long double 8 bytes"
Obviously MS VC6 is intended to run on machines with CHAR_BIT ==
80. What's the problem? :-)

Cross-post to c.l.c++ suppressed on follow-ups.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.

Jun 28 '08 #3
long double wrote:
"double
Type double is a floating type that is larger than or equal to type float,
but shorter than or equal to the size of type long double [-->1]

long double [-->1]
Type long double is a floating type that is equal to type double.

[1] The representation of long double and double is identical.
However, long double and double are separate types."

"Table 3.2 Sizes of Fundamental Types
...
float 4 bytes
double 8 bytes
long double 8 bytes"
Microsoft chose the option (permitted by standard) to make double the same
as long double. Other compilers which rely on Microsoft library support
(Intel ICL /Qlongdouble, or mingw gcc) implement the larger range long
double to a limited extent, but don't have library support for long
double. cygwin gcc is in an intermediate position, as newlib has partial
support for long double. So these versions of wider long double fall
short of standard compliance.
You might argue that a reason for the standard permitting long double to
be implemented as double is inadequate hardware support for wider data
types on some platforms. Compilers for Intel and AMD platforms
increasingly make SSE code their primary supported mode, due in large part
to the potential performance advantage.
Jun 28 '08 #4
Tim Prince wrote:
Microsoft chose the option (permitted by standard) to make double the
same as long double. Other compilers which rely on Microsoft library
support (Intel ICL /Qlongdouble, or mingw gcc) implement the larger
range long double to a limited extent, but don't have library support
for long double. cygwin gcc is in an intermediate position, as newlib
has partial support for long double. So these versions of wider long
double fall short of standard compliance.
Digital Mars C and C++ implements 80 bit long doubles with full library
support.

---
Walter Bright
Digital Mars
http://www.digitalmars.com
C, C++, D programming language compilers
Jun 28 '08 #5
Malcolm McLean wrote:
Why do you need numbers larger than
1.798e+308 ?
What are you measuring?
More bits of precision is useful to prevent (or at least stave off)
creeping errors from doing things like inverting large matrices or doing
finite element sums.

More exponent range is not for measuring things, but to prevent (or at
least stave off) overflows from intermediate calculations.
---
Walter Bright
Digital Mars
http://www.digitalmars.com
C, C++, D programming language compilers
Jun 28 '08 #6

"Walter Bright" <wa****@digitalmars-nospamm.comwrote in message news
Malcolm McLean wrote:
>Why do you need numbers larger than
1.798e+308 ?
What are you measuring?

More bits of precision is useful to prevent (or at least stave off)
creeping errors from doing things like inverting large matrices or doing
finite element sums.
I know. As you say, its only a partial solution. For everyday programming,
the secret is to arrange calculations so that a bit of error can be
tolerated. For instance in games we recalculate all points from the original
mesh values on each frame, we don't iteratively transform them.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

Jun 28 '08 #7
Malcolm McLean wrote:
>
"Walter Bright" <wa****@digitalmars-nospamm.comwrote in message news
>More bits of precision is useful to prevent (or at least stave off)
creeping errors from doing things like inverting large matrices or
doing finite element sums.
I know. As you say, its only a partial solution. For everyday
programming, the secret is to arrange calculations so that a bit of
error can be tolerated. For instance in games we recalculate all points
from the original mesh values on each frame, we don't iteratively
transform them.
Sure, but, for example, algorithms for matrix inversion that correct for
cumulative roundoff error are far more complex and time consuming.

In general, careful fp coding to avoid intermediate overflows and
roundoff error accumulation are not your average coding skills. Take a
look at Cody & Waite's manual, for example.

---
Walter Bright
Digital Mars
http://www.digitalmars.com
C, C++, D programming language compilers
Jun 28 '08 #8
Walter Bright wrote:
Malcolm McLean wrote:
>>
"Walter Bright" <wa****@digitalmars-nospamm.comwrote in message news
>>More bits of precision is useful to prevent (or at least stave off)
creeping errors from doing things like inverting large matrices or
doing finite element sums.
I know. As you say, its only a partial solution. For everyday
programming, the secret is to arrange calculations so that a bit of
error can be tolerated. For instance in games we recalculate all
points from the original mesh values on each frame, we don't
iteratively transform them.

Sure, but, for example, algorithms for matrix inversion that correct for
cumulative roundoff error are far more complex and time consuming.

In general, careful fp coding to avoid intermediate overflows and
roundoff error accumulation are not your average coding skills. Take a
look at Cody & Waite's manual, for example.
If you read the help archives for compilers, you see plenty of people
below the skill level needed to deal with extra precision or any use of
long double.
Jun 29 '08 #9
On Sat, 28 Jun 2008 12:34:04 -0700, Walter Bright wrote:
Malcolm McLean wrote:
>>
Sure, but, for example, algorithms for matrix inversion that correct for
cumulative roundoff error are far more complex and time consuming.

In general, careful fp coding to avoid intermediate overflows and
roundoff error accumulation are not your average coding skills. Take a
look at Cody & Waite's manual, for example.
or

http://www.amazon.com
/Accuracy-Stability-Numerical-Algorithms-Nicholas/dp/0898715210
Jun 29 '08 #10
CBFalconer wrote:
long double wrote:
>>
... snip ...
>Has MS' crappy compiler VC6 implemented this data type or not?
What is your understanding from the citations below from the MS'
'documentation', and/or your own practical experience regarding
this?

"Type long double
The long double contains 80 bits: 1 for sign, 15 for exponent,
and 64 for mantissa. Its range is +/-1.2E4932 with at least 19
digits of precision.
... snip ...
>>
"Table 3.2 Sizes of Fundamental Types
...
float 4 bytes
double 8 bytes
long double 8 bytes"

Obviously MS VC6 is intended to run on machines with CHAR_BIT ==
80. What's the problem? :-)
I guess you mean CHAR_BIT == 10?
Cross-post to c.l.c++ suppressed on follow-ups.
Why? It's just as relevant to C++ as it is to C.

Jun 29 '08 #11
long double wrote:
[1] The representation of long double and double is identical.
However, long double and double are separate types."
char, unsigned char, signed char,
are three separate types.

char has identical representation
to one of the other two.

Which one of the other two, is implementation defined.

--
pete
Jun 29 '08 #12
"Type long double
The long double contains 80 bits: 1 for sign, 15 for exponent,
and 64 for mantissa. Its range is +/-1.2E4932 with at least 19 digits of precision.
//--------------------------------------------------------------
// Demonstrates the use of "long double" (80-bit) on the
// GNU gcc compiler (here using Cygwin for the Windows platform)
//
// See the docs and FAQs of the Windows ports Cygwin or MinGW
// on howto create a static or dynamic library that you can
// link with other compilers.
//
// GCC, the GNU Compiler Collection homepage:
// http://gcc.gnu.org/index.html
//
//--------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <float.h>

int long_double_test()
{
long double ld = 1.2e4931L;

printf("ld=%Lf\n", ld);

return 0;
}

int main(int argc, char* argv[])
{
return long_double_test();
}
/*
Output:
(a very very long number (here manually wrapped into several lines):

ld=11999999999999999999910988708662974381900100000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000
00000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000.000000

*/

Jun 29 '08 #13
More bits of precision is useful to prevent (or at least stave off)
creeping errors from doing things like inverting large matrices or doing
finite element sums.

More exponent range is not for measuring things, but to prevent (or at
least stave off) overflows from intermediate calculations.
It's neccessary sometimes, I agree. But you should try to keep your code
able to cross compile with 64bit double, too.
It's mostly a problem of bad design/coding and bigger accuracy won't make
things "good", just "better".
--
------------------------------------
Gernot Frisch
http://www.glbasic.com

Jun 30 '08 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

75
by: projecktzero | last post by:
I know this might not be the correct group to post this, but I thought I'd start here. A co-worker considers himself "old school" in that he hasn't seen the light of OOP.(It might be because...
6
by: Zip Code | last post by:
"The large print giveth, and the small print taketh away.", so said Tom Waites in his classic rap, "Step Right Up", a paean about come ons and rip offs. Now, we have all explored the fact that...
17
by: John Bailo | last post by:
What does he do all day? Find out here: http://channel9.msdn.com/Showpost.aspx?postid=163166
5
by: pcnerd | last post by:
I just recently got VB.NET 2005 Express Edition. How do I represent logic gates (AND, OR, NOT, etc.) in VB? I considered a function because functions return a value. For example, a 2-input AND...
2
by: alex | last post by:
Hello Friends, Please go through the text. Bill Gates thinks Google should be worried! ------------------------------------------- You must have heard by now about Agloco and how many people...
4
by: alex | last post by:
Hello Friends, Please go through the text. Bill Gates thinks Google should be worried! ------------------------------------------- You must have heard by now about Agloco and how many people...
6
by: Paulo | last post by:
Hi Bill Gates and all your team, I love you man... I hope you can read this! Im doing beautiful things with asp.net 2.0... I love your company and your products... MS is the best of the world...
11
by: VK | last post by:
Bill Gates Announces Resignation http://www.pcmag.com/article2/0,2704,1977363,00.asp The beginning of the year just keeps get interesting...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.