fixdiv(3alleg4) Allegro manual fixdiv(3alleg4)NAME
fixdiv - Fixed point division. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
fixed fixdiv(fixed x, fixed y);
DESCRIPTION
A fixed point value can be divided by an integer with the normal `/' operator. To divide two fixed point values, though, you must use this
function. If a division by zero occurs, `errno' will be set and the maximum possible value will be returned, but `errno' is not cleared if
the operation is successful. This means that if you are going to test for division by zero you should set `errno=0' before calling fix-
div(). Example:
fixed result;
/* This will put 0.06060 `result'. */
result = fixdiv(itofix(2), itofix(33));
/* This will put 0 into `result'. */
result = fixdiv(0, itofix(-30));
/* Sets `errno' and puts -32768 into `result'. */
result = fixdiv(itofix(-100), itofix(0));
ASSERT(!errno); /* This will fail. */
RETURN VALUE
Returns the result of dividing `x' by `y'. If `y' is zero, returns the maximum possible fixed point value and sets `errno' to ERANGE.
SEE ALSO fixadd(3alleg4), fixsub(3alleg4), fixmul(3alleg4), exfixed(3alleg4)Allegro version 4.4.2 fixdiv(3alleg4)

Check Out this Related Man Page

fixdiv(3alleg4) Allegro manual fixdiv(3alleg4)NAME
fixdiv - Fixed point division. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
fixed fixdiv(fixed x, fixed y);
DESCRIPTION
A fixed point value can be divided by an integer with the normal `/' operator. To divide two fixed point values, though, you must use this
function. If a division by zero occurs, `errno' will be set and the maximum possible value will be returned, but `errno' is not cleared if
the operation is successful. This means that if you are going to test for division by zero you should set `errno=0' before calling fix-
div(). Example:
fixed result;
/* This will put 0.06060 `result'. */
result = fixdiv(itofix(2), itofix(33));
/* This will put 0 into `result'. */
result = fixdiv(0, itofix(-30));
/* Sets `errno' and puts -32768 into `result'. */
result = fixdiv(itofix(-100), itofix(0));
ASSERT(!errno); /* This will fail. */
RETURN VALUE
Returns the result of dividing `x' by `y'. If `y' is zero, returns the maximum possible fixed point value and sets `errno' to ERANGE.
SEE ALSO fixadd(3alleg4), fixsub(3alleg4), fixmul(3alleg4), exfixed(3alleg4)Allegro version 4.4.2 fixdiv(3alleg4)

I am new to this socket programming stuff. I have a problem to fix.. i got the error message. "CRITICAL 11/08/05 12:06:26 _getsockopt reports error. errno: 239"
can some please help me with this.. how do i go about fixing this error.
thanx in advance.. (0 Replies)

Hello Friends,
Why I am not getting exact result in the following division. It is rounding off automatically. Is there any way to get the exact result or
can be set by user to get how many digits to carry after the decimal.
gawk '{
wait_ns1 = (82290 +1 )/78 # actuall result =... (3 Replies)

I would like to make a script to read three variables (no fixed length or position) from a line and write them into a file, with fixed length and right-justified in each column. The fixed text (text1-text4) prior to the thee variables and the variables themselves are originally separated by spaces... (3 Replies)

Hey, Can I assume that for certain function calls, errno can never be set to a certain value.
More specifically, can I assume that for if the stat function call fails, the errno can never be or "No space left on device."
I am assuming that a read function cannot fail because of no space... (5 Replies)

Hi,
In our program, we are using SIGTERM and i tired to put break point in this function. But my debuger is unable to brake at that point.
I am working on Mac X and using XCode.
Thanks (1 Reply)

Hi,
I am facing an issue with SEliux blocking my internet usage
Was searching online for its fix. I thnk their has bug raised and fixed FC10.
but anybody guide to get it fixed on FC9.
thanks in advance
Prakash (1 Reply)

Can someone please help?I have a file - fixed.txt----------------------------AABBBBCCCCCCDDDEEFFFFGGGGGGHHHIIJJJJKKKKKKLLL----------------------------To insert delimiters at fixed lengths of 2, 4, 6, 3, I created a file text1.txt as-------------------2463----------------------and trying to execute... (10 Replies)

Hello,
I am searching for a way to calculate for example 10/100 within a shellscript and the result should be 0.1 and not just 0.
Every alternative i tried just results 0
Thank you in advance
2retti (6 Replies)

Hi,
I do have a very simple task to divide 2 variables and display the result.
I CANNOT use bc
when i try
var1=2
var2=4
var3=$(($var1 / $var2))
echo $var3
the output is always 0
What can I change to get a dotted decimal result such as 0.5 ?
Thanks! (5 Replies)

Hei buddies,
Need ur help once again.
I have a file which has bunch of lines which starts from a fixed pattern and ends with another fixed pattern.
I want to make use of these fixed starting and ending patterns to select the bunch, one at a time.
The input file is as follows.
Hi welcome... (12 Replies)