#include <TxqFloatingDecimal.h>
Public Methods | |
| TxqFloatingDecimal (double num) | |
| Constructs from a double. More... | |
| TxqFloatingDecimal (double num, int digits) | |
| Construct from a double and with the number of requested digits. More... | |
| TxqFloatingDecimal (float num) | |
| Constructs from a float. More... | |
| int | getSign () |
| Get the sign of the number. More... | |
| int | getExponentSign () |
| Get the sign of the exponent. More... | |
| int | getExponent () |
| Get the exponent of the number. More... | |
| QString | getStringDigits () |
| gets the requested number of digits and returns as a QString. More... | |
| int | getDigit () |
| Gets the next digit. More... | |
| double | getNumber () |
| Get the number being used. More... | |
| void | setNumDigits (int n) |
| Sets the number of digits. More... | |
| bool | isNegative () |
| Determines if the number is negative. More... | |
| bool | isExceptional () |
| Determines if the number is valid. More... | |
| ~TxqFloatingDecimal () | |
| The destructor. More... | |
Private Methods | |
| void | reformat () |
| Reformat the input number to a QString containing numDigits; The reformatted digits will be contained in stringNumber. More... | |
Private Attributes | |
| double | reformNumber |
| The reformat number. More... | |
| double | digitNumber |
| The digit number which is the absolute value of the number. More... | |
| QString | stringNumber |
| The QString represenation of the number. More... | |
| int | stringIndex |
| An integer index into the string. More... | |
| int | exponent |
| The exponent as an integer value. More... | |
| double | number |
| The number to use to convert. More... | |
| int | sign |
| The sign of the number. More... | |
| int | numDigits |
| The requested number of digits. More... | |
| bool | pastDecimal |
| A bool to determine if past the decimal point. More... | |
| bool | pastFirstDecimal |
| A bool to determine if first number past the decimal point. More... | |
| bool | posExp |
| A bool to determine if a positive exponent. More... | |
This class should only be used for plotting numbers on a graph since the digit retrieval is approximate for some cases, but accurate for most.
Definition at line 44 of file TxqFloatingDecimal.h.
|
|
Constructs from a double.
Definition at line 53 of file TxqFloatingDecimal.h. Referenced by TxqFloatingDecimal().
|
|
|
Construct from a double and with the number of requested digits.
Definition at line 67 of file TxqFloatingDecimal.h. |
|
|
Constructs from a float.
Definition at line 79 of file TxqFloatingDecimal.h. |
|
|
The destructor.
Definition at line 173 of file TxqFloatingDecimal.h. |
|
|
Gets the next digit.
Definition at line 124 of file TxqFloatingDecimal.h. Referenced by TxqSciNumberFormat::format().
|
|
|
Get the exponent of the number.
Definition at line 106 of file TxqFloatingDecimal.h. Referenced by TxqSciNumberFormat::format().
|
|
|
Get the sign of the exponent.
Definition at line 96 of file TxqFloatingDecimal.h. Referenced by TxqSciNumberFormat::format().
|
|
|
Get the number being used.
Definition at line 138 of file TxqFloatingDecimal.h. |
|
|
Get the sign of the number.
Definition at line 87 of file TxqFloatingDecimal.h. Referenced by isNegative().
|
|
|
gets the requested number of digits and returns as a QString.
Definition at line 116 of file TxqFloatingDecimal.h. |
|
|
Determines if the number is valid.
Definition at line 164 of file TxqFloatingDecimal.h. Referenced by TxqSciNumberFormat::format().
|
|
|
Determines if the number is negative.
Definition at line 154 of file TxqFloatingDecimal.h. Referenced by TxqSciNumberFormat::format().
|
|
|
Reformat the input number to a QString containing numDigits; The reformatted digits will be contained in stringNumber. This alogrithm is not based on using the log of the number and moving digits since that is prone to round-off error. (The earlier cvs algorithm) Definition at line 186 of file TxqFloatingDecimal.h. Referenced by TxqFloatingDecimal(), and setNumDigits().
|
|
|
Sets the number of digits.
Definition at line 145 of file TxqFloatingDecimal.h. |
|
|
The digit number which is the absolute value of the number.
Definition at line 331 of file TxqFloatingDecimal.h. |
|
|
The exponent as an integer value.
Definition at line 346 of file TxqFloatingDecimal.h. |
|
|
The requested number of digits.
Definition at line 361 of file TxqFloatingDecimal.h. |
|
|
The number to use to convert.
Definition at line 351 of file TxqFloatingDecimal.h. |
|
|
A bool to determine if past the decimal point.
Definition at line 366 of file TxqFloatingDecimal.h. |
|
|
A bool to determine if first number past the decimal point.
Definition at line 371 of file TxqFloatingDecimal.h. |
|
|
A bool to determine if a positive exponent.
Definition at line 376 of file TxqFloatingDecimal.h. |
|
|
The reformat number.
Definition at line 326 of file TxqFloatingDecimal.h. |
|
|
The sign of the number.
Definition at line 356 of file TxqFloatingDecimal.h. |
|
|
An integer index into the string.
Definition at line 341 of file TxqFloatingDecimal.h. |
|
|
The QString represenation of the number.
Definition at line 336 of file TxqFloatingDecimal.h. |
Copyright Tech-X Corporation, all rights reserved.