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
ProductVersionsPlatforms
.NET2.1, 3.1, 6Windows, Linux, MacOS
.NET Framework4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8Windows
.NET Standard2.0Windows, Linux, MacOS
See Also

Reference

TdNumber Structure
TdNumber Members