floating_point_calculation
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| floating_point_calculation [2012/01/27 16:05] – k2patel | floating_point_calculation [2020/08/10 02:35] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 15: | Line 15: | ||
| Usage is quite simple: | Usage is quite simple: | ||
| - | < | + | < |
| float_eval '12.0 / 3.0' | float_eval '12.0 / 3.0' | ||
| if float_cond '10.0 > 9.0'; then | if float_cond '10.0 > 9.0'; then | ||
| Line 26: | Line 26: | ||
| The code for the functions follows: | The code for the functions follows: | ||
| - | < | + | < |
| #!/bin/bash | #!/bin/bash | ||
| # | # | ||
| Line 103: | Line 103: | ||
| The work of the functions is done by feeding the arguments to '' | The work of the functions is done by feeding the arguments to '' | ||
| - | < | + | < |
| | | ||
| </ | </ | ||
| Line 112: | Line 112: | ||
| If you save the script as '' | If you save the script as '' | ||
| - | < | + | < |
| $ sh float.sh | $ sh float.sh | ||
| 12.5 / 3.2 is 3.90 | 12.5 / 3.2 is 3.90 | ||
| Line 122: | Line 122: | ||
| The one unaswered question you may have is: "and why would I want to do this?" Next time around I'll show you one place you can put this to real world use. | The one unaswered question you may have is: "and why would I want to do this?" Next time around I'll show you one place you can put this to real world use. | ||
| - | Ref : [[ Linux Journal | http:// | + | Ref : [[ http:// |
| ==== Doing Calculation ==== | ==== Doing Calculation ==== | ||
| Line 254: | Line 254: | ||
| </ | </ | ||
| - | Ref. [[http:// | + | Ref. [[ http:// |
floating_point_calculation.1327680322.txt.gz · Last modified: 2020/08/10 02:30 (external edit)