Scientific Computing in the $C^H$ Programming Language

  • Authors:
  • Harry H. Cheng

  • Affiliations:
  • Department of Mechanical and Aeronautical Engineering, University of California, Davis, CA 95616

  • Venue:
  • Scientific Programming
  • Year:
  • 1993

Quantified Score

Hi-index 0.00

Visualization

Abstract

We have developed a general-purpose block-structured interpretive programming Ianguage. The syntax and semantics of this language called $C^H$ are similar to C. $C^H$ retains most features of C from the scientific computing point of view. In this paper, the extension of C to $C^H$ for numerical computation of real numbers will be described. Metanumbers of −0.0, 0.0, Inf, −Inf, and NaN are introduced in $C^H$. Through these metanumbers, the power of the IEEE 754 arithmetic standard is easily available to the programmer. These metanumbers are extended to commonly used mathematical functions in the spirit of the IEEE 754 standard and ANSI C. The definitions for manipulation of these metanumbers in I/O; arithmetic, relational, and logic operations; and built-in polymorphic mathematical functions are defined. The capabilities of bitwise, assignment, address and indirection, increment and decrement, as well as type conversion operations in ANSI C are extended in $C^H$. In this paper, mainly new linguistic features of $C^H$ in comparison to C will be described. Example programs programmed in $C^H$ with metanumbers and polymorphic mathematical functions will demonstrate capabilities of CH in scientific computing.