symport/e32/euser/maths/um_std.h
changeset 1 0a7b44b10206
child 2 806186ab5e14
equal deleted inserted replaced
0:c55016431358 1:0a7b44b10206
       
     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 "Symbian Foundation License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/sfl-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