fixmul(3alleg4) Allegro manual fixmul(3alleg4)NAME
fixmul - Multiplies two fixed point values together. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
fixed fixmul(fixed x, fixed y);
DESCRIPTION
A fixed point value can be multiplied or divided by an integer with the normal `*' and `/' operators. To multiply two fixed point values,
though, you must use this function.
If an overflow 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 overflow you should set `errno=0' before calling fixmul(). Example:
fixed result;
/* This will put 30000 into `result'. */
result = fixmul(itofix(10), itofix(3000));
/* But this overflows, and sets `errno'. */
result = fixmul(itofix(100), itofix(3000));
ASSERT(!errno);
RETURN VALUE
Returns the clamped result of multiplying `x' by `y', setting `errno' to ERANGE if there was an overflow.
SEE ALSO fixadd(3alleg4), fixsub(3alleg4), fixdiv(3alleg4), ex3buf(3alleg4), excustom(3alleg4), exfixed(3alleg4), exspline(3alleg4), exs-
tars(3alleg4), exupdate(3alleg4)Allegro version 4.4.2 fixmul(3alleg4)
Check Out this Related Man Page
fixmul(3alleg4) Allegro manual fixmul(3alleg4)NAME
fixmul - Multiplies two fixed point values together. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
fixed fixmul(fixed x, fixed y);
DESCRIPTION
A fixed point value can be multiplied or divided by an integer with the normal `*' and `/' operators. To multiply two fixed point values,
though, you must use this function.
If an overflow 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 overflow you should set `errno=0' before calling fixmul(). Example:
fixed result;
/* This will put 30000 into `result'. */
result = fixmul(itofix(10), itofix(3000));
/* But this overflows, and sets `errno'. */
result = fixmul(itofix(100), itofix(3000));
ASSERT(!errno);
RETURN VALUE
Returns the clamped result of multiplying `x' by `y', setting `errno' to ERANGE if there was an overflow.
SEE ALSO fixadd(3alleg4), fixsub(3alleg4), fixdiv(3alleg4), ex3buf(3alleg4), excustom(3alleg4), exfixed(3alleg4), exspline(3alleg4), exs-
tars(3alleg4), exupdate(3alleg4)Allegro version 4.4.2 fixmul(3alleg4)
Guys,
I have two big numbers to multiply. In doing do I am getting integer overflow.
I managed to multiply number but this number is useless as KSh does not recognise it as
a valid number. Here is what I am doing
$ expr 999999999999 \* 100
276447132
I got the right value by doing... (2 Replies)
I am an old HP 3000 systems administrator who had to retire the 3000 for some nice pseries AIX boxes. We are a Symitar site and the powers that be do not think we are ready for root acess. I need to find ways within my chains to view system statistics. Being able to wow someone in management... (3 Replies)
i have this file which has the following contents:
,-0.3000 ,-0.3000 ,-0.3000
,-0.9000 ,-0.9000 ,-0.9000
i would like to get this:
-0.3-0.9-0.3-0.9-0.3-0.9
so far i am trying:
awk '{for(i=1; i<=NF; i++) {printf("%f\n",$i)}}' test1 > test2
any help... (4 Replies)
Hi ,
I have input file and i want to extract below strings
<msisdn xmlns="">0492001956</ msisdn> => numaber inside brackets
<resCode>3000</resCode> => 3000 needs to be extracted
<resMessage>Request time
getBalances_PSM.c(37): d out</resMessage></ns2:getBalancesResponse> => the word... (14 Replies)
i have a file contains:
13213,A,300
3423,C,200
5563,A,201
3000,A,400
3000,A,402
3000,A,206
3000,A,303
3000,A,200
4233,N,204
i need to search for numbers in the first column are greater than 3000?
i have another issue if you can help me?
if i want to search in the second or the... (7 Replies)
Hi,
i am trying to count the fields in a file.
Input:
100,1000,,2000,3000,10/26/2012 12:12:30
200,3000,,1000,01/28/2012 17:12:30
300,5000,,5000,7000,09/06/2012 16:12:30
output:
Cout of the fileds for each row
6
5
6
awk -F"," '{print $NF}' file1.txt
When i try with above awk... (3 Replies)