FG

Dividing with Gnu's bc

Fresh3 days ago
Mar 15, 20262452 views
Confidence Score0%
0%

Problem

I'm just starting with Gnu's bc and I'm stuck at the very beginning (very discouraging...). I want to divide two numbers and get a float as result: The man page says, that division returns a number with the same scale as the initial values. Obviously this is either not true or I'm missing something…

Error Output

$bc
bc 1.06.94
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
Fo…

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Dividing with Gnu's bc

Low Risk

You can set the scale with Then division works as expected: To quote from Wikipedia: All numbers and variable contents are arbitrary precision numbers whose precision (in decimal places) is determined by the global variable.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment