Fixed-Point MathFor fast performance TypeServer is tightly optimized using fix-point arithmetic based on integer math. The TypeServer source code allows you to choose between two fixed-point formats referred to as "F26DOT6" (32-bits, F26.6) and "F12DOT4" (16-bits, F12.4). The F26DOT6 data type consists of a 26-bit signed mantissa and a positive unsigned 6-bit fraction (32-bits total). This data type is typically used to define fraction pixel positions for 32- and 64-bit processors. The F12DOT4 data type consists of a 12-bit signed mantissa and a positive unsigned 4-bit fraction (16-bits total). This data type is typically used to define fraction pixel positions for 16- and 8-bit processors. The F26DOT6 and F12DOT4 data types provide fractional accuracy to 1/64th or 1/16th if a unit, respectively. For example, a pixel position in F26DOT6 format provides fractional accuracy to 1/64th of a pixel. "FIXDOT" is a special conditional data type equated either to F26DOT6 or F12DOT4 depending if the identifier "FIXDOT26" is defined. Normally FIXDOT26 is defined 32-bit systems, and is left undefined for 16-bit systems (again, this is a TypeServer source code option that is easily changed).
For additional information on fixed-point types and math functions, please see Appendix A of the Metagraphics Programming Guidelines Manual (.pdf, 235Kb). Home | Products | Order | Register | Support | Company | Contact | Feedback Copyright © 1999-2001 - Metagraphics Software Corporation. |