Numbers in Programming Languages
Low-level programmers have to worry about unsigned and signed, fixed and floating-point numbers. They have to write extremely different code, with different opcodes and operands, to add two floating point numbers compared to the code to add two integers.
However, high-level programming languages such as LISP and Python offer an abstract number that may be an expanded type such as rational, bignum, or complex. Programmers in LISP or Python (among others) have some assurance that their program code will Do The Right Thing with mathematical operations. Due to operator overloading, mathematical operations on any number—whether signed, unsigned, rational, floating-point, fixed-point, integral, or complex—are written exactly the same way. Others languages, such as REXX and Java, provide decimal floating-points, which avoids many "unexpected" results.
Read more about this topic: Computer Number Format
Famous quotes containing the words numbers in, numbers, programming and/or languages:
“What culture lacks is the taste for anonymous, innumerable germination. Culture is smitten with counting and measuring; it feels out of place and uncomfortable with the innumerable; its efforts tend, on the contrary, to limit the numbers in all domains; it tries to count on its fingers.”
—Jean Dubuffet (19011985)
“All experience teaches that, whenever there is a great national establishment, employing large numbers of officials, the public must be reconciled to support many incompetent men; for such is the favoritism and nepotism always prevailing in the purlieus of these establishments, that some incompetent persons are always admitted, to the exclusion of many of the worthy.”
—Herman Melville (18191891)
“If there is a price to pay for the privilege of spending the early years of child rearing in the drivers seat, it is our reluctance, our inability, to tolerate being demoted to the backseat. Spurred by our success in programming our children during the preschool years, we may find it difficult to forgo in later states the level of control that once afforded us so much satisfaction.”
—Melinda M. Marshall (20th century)
“People in places many of us never heard of, whose names we cant pronounce or even spell, are speaking up for themselves. They speak in languages we once classified as exotic but whose mastery is now essential for our diplomats and businessmen. But what they say is very much the same the world over. They want a decent standard of living. They want human dignity and a voice in their own futures. They want their children to grow up strong and healthy and free.”
—Hubert H. Humphrey (19111978)