PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.cplus > Lies of Billy Gates of Microcrap
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Lies of Billy Gates of Microcrap

Réponse
 
LinkBack Outils de la discussion
Vieux 28/06/2008, 03h35   #1
Tim Prince
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Lies of Billy Gates of Microcrap

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.
  Réponse avec citation
Vieux 28/06/2008, 09h03   #2
Tim Prince
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Lies of Billy Gates of Microcrap

Walter Bright wrote:
> Malcolm McLean wrote:
>>
>> "Walter Bright" <walter@digitalmars-nospamm.com> wrote 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 archives for compilers, you see plenty of people
below the skill level needed to deal with extra precision or any use of
long double.
  Réponse avec citation
Vieux 28/06/2008, 18h40   #3
long double
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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"

  Réponse avec citation
Vieux 28/06/2008, 19h10   #4
CBFalconer
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Lies of Billy Gates of Microcrap

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.

  Réponse avec citation
Vieux 28/06/2008, 19h19   #5
Malcolm McLean
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Lies of Billy Gates of Microcrap


"long double" <long-double@long-double.com.invalid> wrote 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


  Réponse avec citation
Vieux 28/06/2008, 19h42   #6
Walter Bright
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Lies of Billy Gates of Microcrap

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
  Réponse avec citation
Vieux 28/06/2008, 19h45   #7
Walter Bright
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Lies of Billy Gates of Microcrap

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
  Réponse avec citation
Vieux 28/06/2008, 19h50   #8
Malcolm McLean
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Lies of Billy Gates of Microcrap


"Walter Bright" <walter@digitalmars-nospamm.com> wrote 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

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 07h29.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,14628 seconds with 16 queries