sl@0: // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // f32test\math\t_r64dta.cpp sl@0: // sl@0: // sl@0: sl@0: #include sl@0: #include "t_vals.h" sl@0: sl@0: GLDEF_D TReal64 addInput[]= sl@0: { sl@0: KMaxTReal64/2,KMaxTReal64/2, sl@0: -KMaxTReal64/2,-KMaxTReal64/2, sl@0: -KMinTReal64,-KMinTReal64, sl@0: KMinTReal64,KMinTReal64, sl@0: KMinTReal64*2,-KMinTReal64, sl@0: 0.0, 0.0, sl@0: KMaxTReal64,-KMaxTReal64, sl@0: 0.0, 1.0, sl@0: 1.9999999999999997, 2.0, sl@0: -1.9999999999999997, -2.0, sl@0: 0.029345, 0.029345, sl@0: 5.2972514E+164, 5.2972514E+164, // These numbers are sufficiently close sl@0: 3.478065637643E+151, 3.478065637643E+151, // sl@0: -3.478065637643E+151, -3.478065637643E+151, // to alter each other in addition... sl@0: 9.8976E+138, -9.8976E+138, sl@0: 1.23472E+7, 1.23472E+7, sl@0: 3.19852E-6, -3.19852E-6, sl@0: 1.39792E-19, 4.9761418241916116E-304, sl@0: 5.2972514E+164, 5.2972514E+164, // and these are not. sl@0: 3.478065637643E+150, 3.478065637643E+150, sl@0: -3.478065637643E+150, -3.478065637643E+150, sl@0: 9.8976E+135, -9.8976E+135, sl@0: 1.23472E+7, 1.23472E+7, sl@0: 3.19852E-7, 3.19852E-7, sl@0: 1.39792E-21, 4.9761418241916116E-304, sl@0: 0.0,KNegZeroTReal64, sl@0: }; sl@0: sl@0: //{-3.478065637643E+150,9.8976E+135} - These value used to fail when rounding up sl@0: sl@0: GLDEF_D TReal64 subInput[] = sl@0: { sl@0: KMaxTReal64/2, -KMaxTReal64/2, sl@0: 0.0, 0.0, sl@0: KMaxTReal64, KMaxTReal64, sl@0: 1.0E+252, -1.0E+252, sl@0: -KMaxTReal64, -KMaxTReal64, sl@0: KMinTReal64, KMinTReal64, sl@0: -KMinTReal64, -KMinTReal64, sl@0: 0.0, 0.0, sl@0: 2*KMinTReal64, KMinTReal64, sl@0: -2*KMinTReal64, -KMinTReal64, sl@0: 1.0, 4.5, sl@0: 1.9999999999999997, 2.0, sl@0: -1.9999999999999997, -2.0, sl@0: 0.029345, 0.029345, sl@0: 5.2972514E+164, 5.2972514E+164, // These numbers are sufficiently close sl@0: 3.478065637643E+151, 3.478065637643E+151, // sl@0: -3.478065637643E+151, -3.478065637643E+151, // to alter each other in addition... sl@0: 9.8976E+138, -9.8976E+138, sl@0: 1.23472E+7, 1.23472E+7, sl@0: 3.19852E-6, -3.19852E-6, sl@0: 1.39792E-19, 4.9761418241916116E-304, sl@0: 5.2972514E+164, 5.2972514E+164, // and these are not. sl@0: 3.478065637643E+150, 3.478065637643E+150, sl@0: -3.478065637643E+150, -3.478065637643E+150, sl@0: 9.8976E+135, -9.8976E+135, sl@0: 1.23472E+7, 1.23472E+7, sl@0: 3.19852E-7, 3.19852E-7, sl@0: 1.39792E-21, 4.9761418241916116E-304, sl@0: 0.0,KNegZeroTReal64, sl@0: }; sl@0: sl@0: // {4.5,1.9999999999999997} - These values used to fail when rounding up sl@0: sl@0: GLDEF_D TReal64 multInput[]= sl@0: { sl@0: 5066549580791808.0,4503599627370500.0, sl@0: 1.0,1.0, sl@0: 0.0, 0.0, sl@0: KSqrtMaxTReal64, KSqrtMaxTReal64, sl@0: -KSqrtMaxTReal64, -KSqrtMaxTReal64, sl@0: KSqrtMinTReal64, KSqrtMinTReal64, sl@0: -KSqrtMinTReal64, -KSqrtMinTReal64, sl@0: 1.0, KMaxTReal64, sl@0: 0.0, KMinTReal64, sl@0: 1.0, 4.5, sl@0: KMinTReal64, KMaxTReal64, sl@0: 1.0, 0.9999999999999997, sl@0: -1.0, -0.9999999999999997, sl@0: 0.029345, 0.029345, sl@0: 3.478065637643E+19, 3.478065637643E+19, sl@0: -3.478065637643E+19, -3.478065637643E+19, sl@0: -0.98976, -0.98976, sl@0: -3.2774997937E+285, -3.2774997937E-285, sl@0: 4.20761202627E+29, 4.20761202627E-29, sl@0: -2.634209025E+202, 2.634209025E-202, // These pairs fail in ARM sl@0: 3.1972712525626E+5, 1.39720715521579E+301, sl@0: 3.1972712525626E-5, 1.39720715521579E-301, sl@0: 4.2720759210720E+184, 3.9275015971055E+122, // sl@0: 4.2720759210720E-184, 3.9275015971055E-122, // sl@0: 0.0,KNegZeroTReal64, sl@0: 2.0,0.0, sl@0: }; sl@0: sl@0: //{5066549580791808.0,4503599627370500.0} - This case used to fail when rounding up sl@0: //{-2.634209025E+202, 2.634209025E-202} - This pair used to fail due to MulTop bug sl@0: //{4.2720759210720E+184, 3.9275015971055E+122} - ditto sl@0: //{4.2720759210720E-184, 3.9275015971055E-122} - ditto sl@0: sl@0: GLDEF_D TReal64 divInput[]= sl@0: { sl@0: 0.0, 0.0, sl@0: KMaxTReal64, KMaxTReal64, sl@0: -KMaxTReal64, -KMaxTReal64, sl@0: 4.0, KMaxTReal64, sl@0: 0.0, 1.0, sl@0: -KMinTReal64, 1.0, sl@0: KMinTReal64,KMinTReal64, sl@0: -KMinTReal64, -KMinTReal64, sl@0: 0.0, 1.0, sl@0: 1.0, 0.9999999999999997, sl@0: -1.0, -0.9999999999999997, sl@0: 1.0, -1.0, sl@0: 0.029345, 0.029345, sl@0: -2.634209025E-295, -2.634209027E-295, sl@0: 2.634209025E-295, 2.634209027E-295, sl@0: -0.98976, -0.98976, sl@0: 3.478065637643E+19, 3.478065637643E+19, sl@0: 3.478065637643E-12,3.478065637644E-12, sl@0: -3.2774997937E+53, -3.2774997937E+53, sl@0: -3.2774997937E+153, -3.2774997937E-153, sl@0: 4.20761202627E+29, 4.20761202627E-29, sl@0: -4.20761202627E+29, -4.20761202627E-29, sl@0: -2.634209025E+78, 2.634209025E-78, sl@0: 3.1972712525626E-5, 1.39720715521579E+301, sl@0: 3.1972712525626E+5, 1.39720715521579E-301, sl@0: 4.2720759210720E-184, 3.9275015971055E+122, sl@0: 4.2720759210720E+184, 3.9275015971055E-122, sl@0: 0.0,KNegZeroTReal64, sl@0: 2.0,0.0 sl@0: }; sl@0: sl@0: //{-KMaxTReal64,4.0} - This pair used to fail before division bug fixed sl@0: //{4.0, KMaxTReal64} - ditto sl@0: sl@0: GLDEF_D TReal64 unaryInput[] = sl@0: {0.0,1.0,-1.0,KMaxTReal64,-KMaxTReal64,KMinTReal64,-KMinTReal64}; sl@0: sl@0: GLDEF_D TReal64 incDecInput[] = sl@0: {0.0,-1.0,1.0,2.0,KMaxTReal64,-KMaxTReal64,KMinTReal64,-KMinTReal64, sl@0: -1672.7577037402694720,1612.8210207019271364, sl@0: 9.0E+14,-9.0E+14,9.0E-14,-9.0E-14, sl@0: 9.0E+16,-9.0E+16,9.0E-16,-9.0E-16}; sl@0: sl@0: GLDEF_D TInt sizeAdd = sizeof(addInput)/sizeof(TReal64); sl@0: GLDEF_D TInt sizeSub = sizeof(subInput)/sizeof(TReal64); sl@0: GLDEF_D TInt sizeMult = sizeof(multInput)/sizeof(TReal64); sl@0: GLDEF_D TInt sizeDiv = sizeof(divInput)/sizeof(TReal64); sl@0: GLDEF_D TInt sizeUnary = sizeof(unaryInput)/sizeof(TReal64); sl@0: GLDEF_D TInt sizeIncDec = sizeof(incDecInput)/sizeof(TReal64);