Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要 '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 $