Forrest logo
back to context overview

dc

List of commands for dc:

  • dc:tldr:2a542 dc: Set number of decimal places to 7 (7 k), calculate 5 divided by -3 (5 _3 /) and [p]rint.
    $ dc --expression='7 k 5 _3 / p'
    try on your machine
    explain this command
  • dc:tldr:2c292 dc: Calculate the golden ratio, phi: set number of decimal places to 100 (100 k), square root of 5 (5 v) plus 1 (1 +), divided by 2 (2 /), and [p]rint result.
    $ dc --expression='100 k 5 v 1 + 2 / p'
    try on your machine
    explain this command
  • dc:tldr:3212f dc: Start an interactive session.
    $ dc
    try on your machine
    explain this command
  • dc:tldr:61f90 dc: Calculate an expression with the specified scale.
    $ dc --expression='${10} k ${5 3 -} p'
    try on your machine
    explain this command
  • dc:tldr:87c7c dc: Execute a script.
    $ dc ${path-to-script-dc}
    try on your machine
    explain this command
back to context overview