os/kernelhwsrv/kernel/eka/euser/maths/um_std.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // e32\euser\maths\um_std.h
    15 // 
    16 //
    17 
    18 #include <e32std.h>
    19 #include <e32math.h>
    20 #include <u32exec.h>
    21 
    22 struct SReal32
    23     {
    24     unsigned man:23;
    25     unsigned exp:8;
    26     unsigned sign:1;
    27     };
    28 
    29 #if defined(__DOUBLE_WORDS_SWAPPED__)
    30 struct SReal64
    31     {
    32     unsigned msm:20;
    33     unsigned exp:11;
    34     unsigned sign:1;
    35     TUint lsm;
    36     };
    37 #define DVAL(m0,m1,m2,m3,e)     {(TUint)((m0<<16)|m1),e+KExponentBias,0,(TUint)((m2<<16)|m3)}
    38 #else
    39 struct SReal64
    40     {
    41     TUint lsm;
    42     unsigned msm:20;
    43     unsigned exp:11;
    44     unsigned sign:1;
    45     };
    46 #define DVAL(m0,m1,m2,m3,e)     {(TUint)((m2<<16)|m3),(TUint)((m0<<16)|m1),e+KExponentBias,0}
    47 #endif
    48 
    49 enum TMathPanic
    50     {
    51 	EMathDivideByZero,
    52 	EMathOverflow,
    53 	EMathUnderflow,
    54 	EMathBadOperand,
    55     EMathUnknownError,
    56 	EMathUnexpectedError1
    57     };
    58 
    59 GLREF_C void Panic(TMathPanic aPanic);
    60