I use bc in AIX to calculate 3/4. The outcome is 0, not 0.75. Why? I am a
beginner of UNIX. Please help me.
3/4 = 0.75... and .75 is truncated, leaving you with an integer 0.
If you want 0.75, then you need to do:
in bc and it will return .75 as desired.
Not an AIX issue, just a 'bc' usage issue. You may want to review the
bc man page for more information about that program by doing the command:
'man bc' (if it is installed on that system).
The "scale" value determines how truncation is handled.
scale = 20
My 3-1/2" floppy drive has stopped responding properly to requests for
its geometry. The low-level "fdformat" utility will query the hardware,
find out that the disk has zero sectors and zero tracks, and exit (it
seems to think its work is done). The drive doesn't show any other
problems: I can put filesystems on the floppies and mount them, and I can
splat kernels directly onto the media with "dd". I can even do a
low-level format with "superformat" (which doesn't seem to ask for the
geometry). The sector/track error is only an issue with "fdformat" and
with Mach---Mach always wants to check the geometry before mounting the
I'm trying to figure out what is causing the problem. In the past, the
floppy drive worked fine. Unfortunately, I can't tell when the problem
occurred; I don't do low-level formats that often. I can think of three
1. My 1992 floppy drive has had a hardware failure, or is simply
incompatible with modern hardware. (It moved from B: to A: a while
back, but I doubt that's the problem).
2. My PCI motherboard's built-in floppy controller is buggy. It's an
Intel Zappa ED, with the Triton 82430FX chipset. It's fairly recent.
3. The Linux floppy driver (which Mach is using) is incompatible with
one of the two pieces of hardware.
Does anyone have suggestions on how to proceed? Thanks.
"Ha! Your Leaping Tiger Kung Fu is no match for my Frightened Piglet style!"
2. moving home