{ "hash": "77f6ddbe041bcfa68dd92248d3cfdeda", "result": { "markdown": "# From calculator to computer\n\n\n\n\n\nLet us consider a basic calculator with buttons to add, subtract, multiply, divide, and take square roots. Using such a simple thing is certainly familiar for any reader of these notes. Indeed, a familiarity with a *graphing* calculator is expected. `Julia` makes these familiar tasks just as easy, offering numerous conveniences along the way. In this section we describe how.\n\n\nThe following image is the calculator that Google presents upon searching for \"calculator.\"\n\n\n\n\n\nThis calculator should have a familiar appearance with a keypad of numbers, a set of buttons for arithmetic operations, a set of buttons for some common mathematical functions, a degree/radian switch, and buttons for interacting with the calculator: `Ans`, `AC` (also `CE`), and `=`.\n\n\nThe goal here is to see the counterparts within `Julia` to these features.\n\n---\n\n\nFor an illustration of a *really* basic calculator, have some fun watching this video:\n\n::: {.cell execution_count=4}\n\n::: {.cell-output .cell-output-display execution_count=5}\n```{=html}\n
Warning
Julia only uses one symbol for minus, but web pages may not! Copying and pasting an expression with a minus sign can lead to hard to understand errors such as: invalid character "−". There are several Unicode symbols that look similar to the ASCII minus sign, but are different. These notes use a different character for the minus sign for the typeset math (e.g., \\(1 - \\pi\\)) than for the code within cells (e.g. 1 - 2). Thus, copying and pasting the typeset math may not work as expected.
| Calculator | Julia |
|---|---|
\\(+\\), \\(-\\), \\(\\times\\), \\(\\div\\) \n |
|
\\(x^y\\)\n |
|
\\(\\sqrt{}, \\sqrt[3]{}\\)\n |
|
\\(e^x\\)\n |
|
\\(\\ln\\), \\(\\log\\) \n |
|
\\(\\sin, \\cos, \\tan, \\sec, \\csc, \\cot\\)\n |
|
In degrees, not radians \n |
|
\\(\\sin^{-1}, \\cos^{-1}, \\tan^{-1}\\)\n |
|
\\(n!\\)\n |
|