os/kernelhwsrv/kerneltest/f32test/math/t_r64dta.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// f32test\math\t_r64dta.cpp
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
#include <e32math.h>
sl@0
    19
#include "t_vals.h"
sl@0
    20
sl@0
    21
GLDEF_D TReal64 addInput[]=
sl@0
    22
	{
sl@0
    23
	KMaxTReal64/2,KMaxTReal64/2,
sl@0
    24
	-KMaxTReal64/2,-KMaxTReal64/2,
sl@0
    25
	-KMinTReal64,-KMinTReal64,
sl@0
    26
	KMinTReal64,KMinTReal64,
sl@0
    27
	KMinTReal64*2,-KMinTReal64,
sl@0
    28
	0.0, 0.0,
sl@0
    29
	KMaxTReal64,-KMaxTReal64,
sl@0
    30
	0.0, 1.0,
sl@0
    31
	1.9999999999999997, 2.0,
sl@0
    32
	-1.9999999999999997, -2.0,
sl@0
    33
	0.029345, 0.029345,
sl@0
    34
	5.2972514E+164, 5.2972514E+164,					// These numbers are sufficiently close
sl@0
    35
	3.478065637643E+151, 3.478065637643E+151,		//
sl@0
    36
	-3.478065637643E+151, -3.478065637643E+151,		// to alter each other in addition...
sl@0
    37
	9.8976E+138, -9.8976E+138,						
sl@0
    38
	1.23472E+7, 1.23472E+7, 						
sl@0
    39
	3.19852E-6, -3.19852E-6,						
sl@0
    40
	1.39792E-19, 4.9761418241916116E-304,			
sl@0
    41
	5.2972514E+164, 5.2972514E+164,					// and these are not.
sl@0
    42
	3.478065637643E+150, 3.478065637643E+150,
sl@0
    43
	-3.478065637643E+150, -3.478065637643E+150,	
sl@0
    44
	9.8976E+135, -9.8976E+135,		
sl@0
    45
	1.23472E+7, 1.23472E+7, 
sl@0
    46
	3.19852E-7, 3.19852E-7,
sl@0
    47
	1.39792E-21, 4.9761418241916116E-304,
sl@0
    48
	0.0,KNegZeroTReal64,					
sl@0
    49
	};
sl@0
    50
sl@0
    51
//{-3.478065637643E+150,9.8976E+135} - These value used to fail when rounding up
sl@0
    52
sl@0
    53
GLDEF_D TReal64 subInput[] = 
sl@0
    54
	{
sl@0
    55
	KMaxTReal64/2, -KMaxTReal64/2,
sl@0
    56
	0.0, 0.0,
sl@0
    57
	KMaxTReal64, KMaxTReal64,
sl@0
    58
	1.0E+252, -1.0E+252,
sl@0
    59
	-KMaxTReal64, -KMaxTReal64,
sl@0
    60
	KMinTReal64, KMinTReal64,
sl@0
    61
	-KMinTReal64, -KMinTReal64,
sl@0
    62
	0.0, 0.0,
sl@0
    63
	2*KMinTReal64, KMinTReal64,
sl@0
    64
	-2*KMinTReal64, -KMinTReal64,
sl@0
    65
	1.0, 4.5,						
sl@0
    66
	1.9999999999999997, 2.0,
sl@0
    67
	-1.9999999999999997, -2.0,
sl@0
    68
	0.029345, 0.029345,
sl@0
    69
	5.2972514E+164, 5.2972514E+164,					// These numbers are sufficiently close
sl@0
    70
	3.478065637643E+151, 3.478065637643E+151,		//
sl@0
    71
	-3.478065637643E+151, -3.478065637643E+151,		// to alter each other in addition...
sl@0
    72
	9.8976E+138, -9.8976E+138,						
sl@0
    73
	1.23472E+7, 1.23472E+7, 						
sl@0
    74
	3.19852E-6, -3.19852E-6,						
sl@0
    75
	1.39792E-19, 4.9761418241916116E-304,			
sl@0
    76
	5.2972514E+164, 5.2972514E+164,					// and these are not.
sl@0
    77
	3.478065637643E+150, 3.478065637643E+150,
sl@0
    78
	-3.478065637643E+150, -3.478065637643E+150,
sl@0
    79
	9.8976E+135, -9.8976E+135,
sl@0
    80
	1.23472E+7, 1.23472E+7, 
sl@0
    81
	3.19852E-7, 3.19852E-7,
sl@0
    82
	1.39792E-21, 4.9761418241916116E-304,
sl@0
    83
	0.0,KNegZeroTReal64,					
sl@0
    84
	};
sl@0
    85
sl@0
    86
// {4.5,1.9999999999999997}	- These values used to fail when rounding up
sl@0
    87
	
sl@0
    88
GLDEF_D TReal64 multInput[]=
sl@0
    89
	{
sl@0
    90
	5066549580791808.0,4503599627370500.0,
sl@0
    91
	1.0,1.0,
sl@0
    92
	0.0, 0.0,
sl@0
    93
	KSqrtMaxTReal64, KSqrtMaxTReal64,					
sl@0
    94
	-KSqrtMaxTReal64, -KSqrtMaxTReal64,
sl@0
    95
	KSqrtMinTReal64, KSqrtMinTReal64,					
sl@0
    96
	-KSqrtMinTReal64, -KSqrtMinTReal64,
sl@0
    97
	1.0, KMaxTReal64,
sl@0
    98
	0.0, KMinTReal64,
sl@0
    99
	1.0, 4.5,
sl@0
   100
	KMinTReal64, KMaxTReal64, 
sl@0
   101
	1.0, 0.9999999999999997,
sl@0
   102
	-1.0, -0.9999999999999997,
sl@0
   103
	0.029345, 0.029345,
sl@0
   104
	3.478065637643E+19, 3.478065637643E+19,
sl@0
   105
	-3.478065637643E+19, -3.478065637643E+19,
sl@0
   106
	-0.98976, -0.98976,
sl@0
   107
	-3.2774997937E+285, -3.2774997937E-285,
sl@0
   108
	4.20761202627E+29, 4.20761202627E-29,
sl@0
   109
	-2.634209025E+202, 2.634209025E-202,			// These pairs fail in ARM
sl@0
   110
	3.1972712525626E+5, 1.39720715521579E+301,
sl@0
   111
	3.1972712525626E-5, 1.39720715521579E-301,
sl@0
   112
	4.2720759210720E+184, 3.9275015971055E+122,		//
sl@0
   113
	4.2720759210720E-184, 3.9275015971055E-122,		//
sl@0
   114
	0.0,KNegZeroTReal64,
sl@0
   115
	2.0,0.0,
sl@0
   116
	};
sl@0
   117
sl@0
   118
//{5066549580791808.0,4503599627370500.0} - This case used to fail when rounding up
sl@0
   119
//{-2.634209025E+202, 2.634209025E-202} - This pair used to fail due to MulTop bug 
sl@0
   120
//{4.2720759210720E+184, 3.9275015971055E+122} - ditto
sl@0
   121
//{4.2720759210720E-184, 3.9275015971055E-122} - ditto
sl@0
   122
sl@0
   123
GLDEF_D TReal64 divInput[]=
sl@0
   124
	{
sl@0
   125
	0.0, 0.0,
sl@0
   126
	KMaxTReal64, KMaxTReal64,
sl@0
   127
	-KMaxTReal64, -KMaxTReal64,
sl@0
   128
	4.0, KMaxTReal64,
sl@0
   129
	0.0, 1.0,
sl@0
   130
	-KMinTReal64, 1.0,
sl@0
   131
	KMinTReal64,KMinTReal64,
sl@0
   132
	-KMinTReal64, -KMinTReal64,
sl@0
   133
	0.0, 1.0,  
sl@0
   134
	1.0, 0.9999999999999997,
sl@0
   135
	-1.0, -0.9999999999999997,
sl@0
   136
	1.0, -1.0,
sl@0
   137
	0.029345, 0.029345,
sl@0
   138
	-2.634209025E-295, -2.634209027E-295,
sl@0
   139
	2.634209025E-295, 2.634209027E-295,
sl@0
   140
	-0.98976, -0.98976,
sl@0
   141
	3.478065637643E+19, 3.478065637643E+19,
sl@0
   142
	3.478065637643E-12,3.478065637644E-12,
sl@0
   143
	-3.2774997937E+53, -3.2774997937E+53,
sl@0
   144
	-3.2774997937E+153, -3.2774997937E-153,
sl@0
   145
	4.20761202627E+29, 4.20761202627E-29,
sl@0
   146
	-4.20761202627E+29, -4.20761202627E-29,
sl@0
   147
	-2.634209025E+78, 2.634209025E-78,
sl@0
   148
	3.1972712525626E-5, 1.39720715521579E+301,
sl@0
   149
	3.1972712525626E+5, 1.39720715521579E-301,
sl@0
   150
	4.2720759210720E-184, 3.9275015971055E+122,
sl@0
   151
	4.2720759210720E+184, 3.9275015971055E-122,
sl@0
   152
	0.0,KNegZeroTReal64,
sl@0
   153
	2.0,0.0
sl@0
   154
	};
sl@0
   155
sl@0
   156
//{-KMaxTReal64,4.0} - This pair used to fail before division bug fixed
sl@0
   157
//{4.0, KMaxTReal64} - ditto
sl@0
   158
sl@0
   159
GLDEF_D TReal64 unaryInput[] =
sl@0
   160
	{0.0,1.0,-1.0,KMaxTReal64,-KMaxTReal64,KMinTReal64,-KMinTReal64};
sl@0
   161
	
sl@0
   162
GLDEF_D TReal64 incDecInput[] =
sl@0
   163
	{0.0,-1.0,1.0,2.0,KMaxTReal64,-KMaxTReal64,KMinTReal64,-KMinTReal64,
sl@0
   164
	-1672.7577037402694720,1612.8210207019271364,
sl@0
   165
	9.0E+14,-9.0E+14,9.0E-14,-9.0E-14,
sl@0
   166
	9.0E+16,-9.0E+16,9.0E-16,-9.0E-16};
sl@0
   167
sl@0
   168
GLDEF_D TInt sizeAdd = sizeof(addInput)/sizeof(TReal64);
sl@0
   169
GLDEF_D TInt sizeSub = sizeof(subInput)/sizeof(TReal64);
sl@0
   170
GLDEF_D TInt sizeMult = sizeof(multInput)/sizeof(TReal64);
sl@0
   171
GLDEF_D TInt sizeDiv = sizeof(divInput)/sizeof(TReal64);
sl@0
   172
GLDEF_D TInt sizeUnary = sizeof(unaryInput)/sizeof(TReal64);
sl@0
   173
GLDEF_D TInt sizeIncDec = sizeof(incDecInput)/sizeof(TReal64);