Some soon to be updated documentation for napkin math


I had an old machine give out on me earlier this week.  The memory on it had started giving parity errors, and the hard drive finally went out completely - fdisk simply would not even run any more.  This particular machine had been the machine I use to write automation scripts, so I had to recreate all those files on a new machine.  Moving to a newer machine had been on my to do list for awhile, so of all the time for a machine to die, this was as good as a time as any.


As I'm getting my new machine set up, I tried running the napkin math automation scripts as a test to ensure the new machine was working properly.  I checked the online help at just to be complete while the script was running and noticed OneNote has a little more functionality built into it than the help file documents.


For instance, x and X are treated as valid multiplication operators.  So 5x3.2=  resolves to 16.  Nice - our napkin math feature is designed to be lightweight, and for students in lower level math classes, x is the operator used most.  Seems easy and discoverable.


There are a couple of other operators supported which "feel" well used enough - the ! (factorial) and mod (modulus) functions.  ! is the standard operation which multiplies all positive integers less than the number together, so 5! = 5x4x3x2x1 = 120.  The mod function gives the remainder of a division operation: 14mod4=2, since 2 is the remainder when 14 is divided by 4.  Pretty standard stuff.


Lastly, there are 2 constants supported by OneNote: pi and phi.  Pi=3.141592653589793 and phi=1.618033988749895.   Phi is the "golden mean," computed by (1+sqrt(5))/2.   While maybe not the most standard constant to have, it may be useful to have around.


And here is the final part that surprised me the most.  The Greek letters for pi and pi are supported as constants in both lower case and capital forms.  Try it out:


π=should give 3.141592653589793

Π=should give 3.141592653589793

φ=should give 1.618033988749895

Φ=should give 1.618033988749895


(Use character map to insert the symbols if you want). 


The next thing I did? 1xpi=...


Since I am a tester, I wanted to file a bug against our documentation for omitting this functionality.  I got in touch with the writer, gave him the details and the web page will get updated.  I don't know how long this will take - the documentation will need to be translated into all the supported languages, the web pages created, tested and finally deployed.   In the meantime, I thought this would be kind of interesting.


I'll also update the automation script one more time to cover these items.  This will fall into bucket 1 from our list of automation work to complete.  Remember when I said my machine picked a good time to die?  I got a bug out of it, and it can't get much better than that for testers.


Questions, comments, concerns and criticisms always welcome,