Magic Number

Icon

Constants Drawer

How to use
constants efficiently.

Sorting

Before we use any constants, let’s make them easy to find.

Click To Sort

Sort by symbol

Good for glancing. E.g. scanning for
c is quicker than hunting for ‘Speed of light’.

Sort By Symbol

Sort by title

Good for browsing. E.g. all the electron related constants are grouped together.

Sort By Name

Inserting constants

Previously, you have to double-click to insert.
Now you can press:

⌘ ↩    (command-return)

Insert As Symbol

Insert differently

If you want to insert the value instead, press:

⌥ ⌘ ↩    (option-command-return)

Insert As Value

Homework

The History drawer also has 2 different insertions.
Find out what they are. It’s quite handy.

Recent constants

To illustrate, let’s insert the first 3 constants:

Bohr radius,
Standard atmosphere,
Fine structure constant

Recent Constants

Magic Number remembers your recently used constants:

Recent Menu

The most recent one is at the top of the list.

Let’s clear the display before we go on. With many constants on the display, it can get confusing.


The shortcut

Press ⌃K  (control-K) to insert the top (most recent) constant.

Press again for the next one down.
Repeat again to cycle through the list.

Recent Cycle

By default, Magic Number remembers the 5 most recent constants. You can have more.

Recent Menu Option

With 10 constants to cycle through, there is another handy shortcut for you.

⇧⌃K  (shift-control-K)

It cycles through the constants in reverse.

Recent Cycle in Reverse

One last thing, you can use these shortcuts anytime without opening the drawer.

Making constants

You can use the memory feature to make constants.
Memories are like variables. You can use letters a, b, k, m, n.

For example, to set m to 42, enter

m = 42

and press return.


Making it better

Sometimes those letters do not suit our needs. We can:

  • Give it a meaningful name
    Instead of ‘m’ you can have longer name like ‘mass’.
  • Create a custom shortcut
    Since memories are also available as menu, you can create a custom shortcut. (See the last tip.)

Example

The mass of deuteron is 3.343586e-27 kg.
Let’s save it for the future.

Enter ‘m = 3.343586e-27’ and hit return:

Memory assign: Deutron mass

‘m’ is not a memorable name. Let’s rename it to ‘dm’.

Go to menu: Calculation > Memory Options…

Memory Options

You can see the new name is reflected instantly:

Memory renamed

At this point, it’s natural to set a custom shortcut,
maybe option-d for deuteron. But let’s wait a minute.

Since custom shortcut ties to the memory name,
make sure you are happy with the name first.

The current name is OK.
But we can do better. Time for the next tip.

Subscripts

Constants such as Planck temperature has a subscript.

Tp

We can make subscript with underscore ‘_’.


For our deuteron mass example:

Named_m

dm

Let’s try something descriptive:

Namedeuteron_mass

deuteronmass


Automatic subscripts

In math, we often have variables like  a1 , a2 , a3 … etc.

If your name ends with a number, it will conveniently become a subscript.
No need for ‘_’.

Examples:

NameM2

M2

Nameabc123

abc123


Comments

  1. In practice you probably use ‘m_d’ as the name for deuteron mass so that it is consistent with constants like electron mass.
  2. If you really want ‘deuteron_mass’ instead of ‘deuteronmass’,
    add ‘_’ before the name so that it becomes ‘_deuteron_mass’.

See the hidden value

Sometimes it’s useful to see the value behind a constant.
Maybe for checking or as a confirmation.

Imagine you are not sure what  h  is.

Expression with h

Press  ⌘I  to see its value briefly.

Expression with h revealed

This trick also works for memories and tax rates.