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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32\euser\maths\um_log.cpp
15 // Floating point base 10 logarithm
21 #if defined(__USE_VFP_MATH) && !defined(__CPU_HAS_VFP)
22 #error __USE_VFP_MATH was defined but not __CPU_HAS_VFP - impossible combination, check variant.mmh
26 #ifndef __USE_VFP_MATH
28 EXPORT_C TInt Math::Log(TReal &aTrg,const TReal &aSrc)
30 Calculates the logarithm to base 10 of a number.
32 @param aTrg A reference containing the result.
33 @param aSrc The number whose logarithm is required.
35 @return KErrNone if successful, otherwise another of
36 the system-wide error codes.
39 // Base 10 log routine. See Software manual by W.J.Cody & W.Waite
43 TInt ret=Math::Ln(aTrg,aSrc);
50 #else // __USE_VFP_MATH
52 // definitions come from RVCT math library
53 extern "C" TReal log10(TReal);
55 EXPORT_C TInt Math::Log(TReal& aTrg, const TReal& aSrc)
58 if (Math::IsFinite(aTrg))
60 if (Math::IsInfinite(aTrg))