我需要’bc’来划分一个数字,不仅给我一个地板,而且剩下的。例如,如果我’5/2’,’bc’给我’2’。我真的想要像“2.5”
也许这是不可能的?
scale = 20
它设置小数位数。
$ bc bc 1.06 Copyright 1991-1994,1997,1998,2000 Free Software Foundation,Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. 355/113 3 scale=20 355/113 3.14159292035398230088 quit $