Mathematical operation
(1)Using let
let result=2+1
let result=2-1
let result=2*1
let result=2/1
(2) Using bracket
echo $(($p1+$p2))
OR sum=$(($p1+$p2))
echo $sum
(3) Using ` and expr
1.乘号(*), 左括号( ( ) , 右括号( ) )必须使用反斜杠(\)转义。
2.expr右边以及运算符和括号的两边必须有空格
result=`expr 4 + 2`
result=`expr 4 - 2`
result=`expr 4 \* 2`
result=`expr 4 / 2`
result=`expr 4 % 2`
result=`expr \( 4 - 2 \) \* 2` (注意两项的综合运用)
Mathematical operation的更多相关文章
- Theano Graph Structure
Graph Structure Graph Definition theano's symbolic mathematical computation, which is composed of: A ...
- linux shell program summary
from:Sep 23 2016 mathematical operation: floating number,bc calculator: we can also use bc in shell ...
- Deep Learning in a Nutshell: Core Concepts
Deep Learning in a Nutshell: Core Concepts This post is the first in a series I’ll be writing for Pa ...
- (转) Deep Learning in a Nutshell: Core Concepts
Deep Learning in a Nutshell: Core Concepts Share: Posted on November 3, 2015by Tim Dettmers 7 Comm ...
- Understanding Convolution in Deep Learning
Understanding Convolution in Deep Learning Convolution is probably the most important concept in dee ...
- 深度卷积神经网络用于图像缩放Image Scaling using Deep Convolutional Neural Networks
This past summer I interned at Flipboard in Palo Alto, California. I worked on machine learning base ...
- General Purpose Hash Function Algorithms
General Purpose Hash Function Algorithms post@: http://www.partow.net/programming/hashfunctions/inde ...
- RESTful Web Services: A Tutorial--reference
As REST has become the default for most Web and mobile apps, it's imperative to have the basics at y ...
- [转载] Conv Nets: A Modular Perspective
原文地址:http://colah.github.io/posts/2014-07-Conv-Nets-Modular/ Conv Nets: A Modular Perspective Posted ...
随机推荐
- 这一路走来,冷暖自知 (附算法demos)
最近半年多,除了“一键修图”算法之外我还做了其他什么算法? 1.实时单图HDR算法(颜色矫正,智能曝光) 2.多图曝光融合HDR算法(最高支持八百万像素左右) 3.模拟热能探测算法 4.防伪探测算法 ...
- 算法分析 Analysis of Algorithms -------GeekforGeeker 翻译
算法分析 Analysis of Algorithms 为什么要做性能分析?Why performance analysis? 在计算机领域有很多重要的因素我们要考虑 比如用户友好度,模块化, 安全性 ...
- 2014 Super Training #2 F The Bridges of Kolsberg --DP
原题:UVA 1172 http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_ ...
- Treap(树堆):随机平衡二叉树实现
本文是根据郭家宝的文章<Treap的原理及实现>写的. #include<stdio.h> #include<string.h> #include<stdli ...
- mysql查询语句包含有关键字
查询mysql的时候,有时候mysql表名或者列名会有关键字.这时候查询会有错误.例如表名是order,查询时候会出错. 简单的办法是sql语句里表名或者列名加上`[tab键上面]来加以区别,例如se ...
- lcx转发 【解决内网没法链接3389 的问题】
要求我自己在外网 然后监听1111端口,将1111端口数据流量转发至2222端口 被入侵主机上 将本地的2222端[愿3389 主机修改了远程连接的端口]口流量转发至外网ip的1111端口 2222为 ...
- andorid 自定义seekbar
效果如图: <?xml version="1.0" encoding="utf-8"?> <resources> <style n ...
- shell+curl监控网站页面(域名访问状态),并利用sedemail发送邮件
应领导要求,对公司几个主要站点的域名访问情况进行监控.下面分享一个监控脚本,并利用sendemail进行邮件发送. 监控脚本如下:下面是写了一个多线程的网站状态检测脚本,直接从文件中读出站点地址,然后 ...
- 12SpringMvc_在业务控制方法中写入普通变量收集参数
这篇文章讲的是jsp页面不是会传一些参数到Action中,那么Action怎么去接受这个数据呢? 方案: 案例结构如下:
- max_allowed_packet自动恢复
https://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html http://blog.chinaunix.net/uid-20304801 ...