From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c3768896d3e82ec X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Game Programming / Graphics Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1112471680.276284.42140@o13g2000cwo.googlegroups.com> Date: Sun, 3 Apr 2005 10:53:01 +0200 Message-ID: <271ug8iv5jlv.1fh0nt13vc9t7$.dlg@40tude.net> NNTP-Posting-Date: 03 Apr 2005 10:52:54 MEST NNTP-Posting-Host: e8b1600d.newsread2.arcor-online.net X-Trace: DXC=`PH28MkX1RVWlBlPAT_ljXQ5U85hF6f;TjW\KbG]kaMX]kI_X=5KeaVUl26[mb<9>T[6LHn;2LCV^COgUkn_?_Y_L]KlMAUGXi^ X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:10241 Date: 2005-04-03T10:52:54+02:00 List-Id: On 2 Apr 2005 11:54:40 -0800, jsnX wrote: > What is Ada's numerics model like? I've > heard that it's better than C++'s, but I haven't seen any specifics. The main difference is that in C++ you specify what your computer has. In Ada you do what you nee: // C++ double X; -- Ada type Something is digits 8 range 0.0..100_000.0; X : Something; I.e. Ada's numerics are based on a contract model. Ada's numerics are true types. You can have different numeric types and the compiler will prevent you from mixing them, if you do not define corresponding operations. As types they may have constrained subtypes with range checks enforced. Other differences are that Ada has fixed point binary and decimal numbers additionally to the floating-point ones. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de