Clashes of slashes or the division of dividers
Channel: NLPW::2014
Date: 2014-05-24

NLPW::2014

Nederlandse Perl Workshop, 25-April, Utrecht

by: Theo van Hoesel

READING | WRITING | COMPUTING

FRACTIONS IN PERL CODE

In common language we use fractions more often then we are aware of. However, since the introduction of computational power and poor designed keyboards or character sets, we accepted insane notations. Floating-point numbers belong to the domain of science and can be used to express approximations of results.

As math-teacher and forum-moderator, I was quite frustrated about the abusive use of all kind of symbols, like the 'slash' in expressions:

X^2=(3 1/2X+10)/3 # Arggh!

Simply because one did not know how to type a mathematical correct expression in Unicode:

𝒙² = 3½𝒙+10 ÷ 3 # Yay! We have Unicode

So, we have Unicode, but what about using Unicode fraction in your Perl code: reading, writing and computations, all in one!

But do not think that Unicode is your friend for doing fractions and math on one single line: with all the different symbols there is still a essential 'missing slash'