你好
我正在尝试四舍五入,但遇到了一些麻烦。 例如。 我有数字 .915 和 .915000021 我尝试使用精确度和固定十进制将 .915000021 舍入到 .915。 但是,在我使用精度或固定十进制后,.915000021 没有改变。 有什么想法可以改变这个吗? 也有多个这样的实例,所以编辑列对我来说是最好的解决方案。
我可以复制列并使用公式将所有内容四舍五入然后粘贴并删除原始列吗?
任何建议都会受到重视。


JMP数字格式更改数据的显示方式,但不更改基础值。 可能您需要“Round()”函数,但与往常一样,您应该谨慎修改数据值本身。 将下面的代码复制并粘贴到脚本窗口中,执行“编辑 > 运行脚本”,然后查看公式列:
New Table( "Formats and Rounding",
Add Rows( 10 ),
New Column( "Precise Value",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( Random Normal() )
),
New Column( "Precise Value with 'Fixed Dec' Format",
Numeric,
"Continuous",
Format( "Fixed Dec", 12, 2 ),
Formula( :Precise Value )
),
New Column( "Precise Value with 'Precision' Format",
Numeric,
"Continuous",
Format( "Precision", 12, 2 ),
Formula( :Precise Value )
),
New Column( "Precise Value Rounded to 2 Decimal Places",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( Round( :Precise Value, 2 ) )
)
)