Harry H. Cheng
Dual numbers are in the form of x+ey with e^2 = 0. Dual metanumbers are defined in this paper as DualZero, DualInf, and DualNaN. The extended dual plane and extended finite dual plane are introduced in this paper to describe dual numbers and dual metanumbers. Handling of dual numbers in the CH programming language is presented in this paper. The I/O, arithmetic and relational operations, and built-in mathematical functions are defined for both dual numbers and dual metanumbers. Due to polymorphism, the syntaxes of dual arithmetic and relational operations, and built-in dual functions are the same as those for real and complex numbers in the CH programming language. The valid lvalues related to dual numbers in CH are defined. The computation of the motion screw for a rigid body displacement is used as an example to illustrate the creation of user's dual functions. The efficacy of CH programming with dual numbers is demonstrated by displacement analysis of a RCCC mechanism. For the first time, dual data is handled as a built-in data type in a general-purpose computer programming language. Programming with dual numbers in CH is simpler than in any other computer programming languages.