Send feedback on this topic.
Teradata.Client.Provider
ToDouble Method (TdNumber)



Teradata.Client.Provider Namespace > TdNumber Structure : ToDouble Method
The TdNumber that is to be converted to a double precision number.
Converts the value of the specified TdNumber into a Double .
Syntax
'Declaration
 
Public Shared Function ToDouble( _
   ByVal input As TdNumber _
) As Double
'Usage
 
Dim input As TdNumber
Dim value As Double
 
value = TdNumber.ToDouble(input)
public static double ToDouble( 
   TdNumber input
)
public:
static double ToDouble( 
   TdNumber input
) 

Parameters

input
The TdNumber that is to be converted to a double precision number.

Return Value

A double precision value that is equivalent to the specified TdNumber is returned.
Exceptions
ExceptionDescription
The value of the TdNumber is Null.
Remarks

When a TdNumber is converted into s System.Double a rounding error may occur.

The reason for this is that the mantissa of a Double has a precision of 16 digits. A TdNumber has a precision of 40 digits. When a TdNumber is converted to a System.Double, it will be truncated at the 17th position from the left.

Requirements

Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019

See Also

Reference

TdNumber Structure
TdNumber Members