gnuplot - Is there a gnuplot setting to interpret ints as floats?
问题描述
gnuplot has the well-known gotcha of integer division, so 1/2 = 0
. Float literals are one solution: 1./2
or 1/2.
.
I use gnuplot as a calculator, e.g. pr 1/2
(print
abbr), and it's easy to forget the .
, and there's no warning. I've never actually wanted integer arithmetic.
Is there a setting to force floating point arithmetic --- to interpret integers as floats? (to have in my ~/.gluplot
config)
解决方案
推荐阅读
- vue.js - Vue:如何应用多个全局混合
- selenium - 如何重现 Selenium 错误 - 对远程 WebDriver 的 HTTP 请求在 60 秒后超时
- amcharts - 具有丰富 HTML 内容的工具提示无助于创建所需的 UI?
- python-3.x - 有没有一种方法可以将批处理文件脚本上传到 python 中(并且能够使用它们)
- css - React-Native 中边框半径图像的自定义形状
- mysql - 从派生表优化 SQL 查询
- javascript - 如何通过单击 chrome 中的选项卡在离开站点之前显示警告消息?
- node.js - 将自定义属性保存在用户数据库而不是用户池中
- mysql - 令人惊讶的 sql 查询时间统计
- c++ - C++ 创建一个存储不同类型名的向量