11-26-2009
Sounds like a school assignment.
The average of the logarithmic values of a data set, converted back to a base 10 number is how to generate a geometric mean.
1. for each element, generate the log - use the log() function. Keep a running total of the log values.
2. divide the running total by n
3. convert the resulting "average" log value base to a base 10 number - exp(avg log value) gives that.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
My name is vreddy and I am learning c language now and written one programme on vi editor.
how do I compile the programme please give me some advice and that would be helpfull for me.
thanks
vre (10 Replies)
Discussion started by: vasudeva
10 Replies
2. Shell Programming and Scripting
hi
i am having a c code which gives the output of my password in text format
i.e when i run my c code which which gives the password asfollows====>>>>>>
$./passwdprogram ======>>>>>>abc@123(this is the output)
now i have an expect script to remotely ssh which uses the password set in ... (0 Replies)
Discussion started by: xander
0 Replies
3. What is on Your Mind?
Hi All,
Can any one know about "Certification Programme for Unix Shell Scripting"?
How do I become Certified Unix shell scripting programmer? Where will I get this certification? How do I continue my career as a script programmer? What are the additional things to learn.
Currently I know... (14 Replies)
Discussion started by: ganapati
14 Replies
4. Programming
Dear Friends,
I ve two text files like
re_im.dat
13.7663000000 5.9572200000
10.2682000000 10.9345000000
5.0810700000 14.1132000000
two real values per row
Sarf.dat
127 128 128 128 71 0
128 128 128 128 71 0
128 128 128 128 71 0
This is having 6... (2 Replies)
Discussion started by: user_prady
2 Replies
5. Shell Programming and Scripting
Hi Guyz
can u tell me how to write a programme in perl using snmpget.
Regards'
Harrr (0 Replies)
Discussion started by: Harikrishna
0 Replies
6. Programming
Hi All,
How to call the C programme in UNIX shell scripting?
please send me some sample script for the above scenario.
Regards,
MPS:b: (1 Reply)
Discussion started by: psiva_arul
1 Replies
7. Programming
I have some compile programme .crn now I want to run .crn programme on express cobol which allow only *.gnt programme any solution to run *.crn programme (0 Replies)
Discussion started by: bibi
0 Replies
8. Programming
hello every one
i am working on a project to lock remote computer resources(hard drive, usb, cd- rom, folder etc). i have maintained connection using JAVA RMI and using JAVA JNI to lock resources, now i am really stuck up with C programme to do actual locking, i am using RHL-5 on admin computer... (7 Replies)
Discussion started by: zius_oram
7 Replies
9. Programming
hello,
For school i make the next mission:
give how many chambers in a constant number. use an array which chamber is free and count how many chamber there are free. make also something to test
I don't now how to start. I need an well example so i can make the mission
thank you (1 Reply)
Discussion started by: wouter88
1 Replies
10. Shell Programming and Scripting
hi buddies;
i have a very strange problem. i made a script composed of just 5 line. it is containing awk and nawk codes and it is working perfectly when it is applied one-by-one (copy & paste).
but when i type run myscript.mos, it is giving:
nawk: syntax error at source line 1
context is... (5 Replies)
Discussion started by: gc_sw
5 Replies
LEARN ABOUT REDHAT
ftofix
ftofix(3alleg4) Allegro manual ftofix(3alleg4)
NAME
ftofix - Converts a floating point value to fixed point. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
fixed ftofix(double x);
DESCRIPTION
Converts a floating point value to fixed point. Unlike itofix(), this function clamps values which could overflow the type conversion, set-
ting `errno' to ERANGE in the process if this happens. Example:
fixed number;
number = itofix(-40000);
ASSERT(fixfloor(number) == -32768);
number = itofix(64000);
ASSERT(fixfloor(number) == 32767);
ASSERT(!errno); /* This will fail. */
RETURN VALUE
Returns the value of the floating point value converted to fixed point clamping overflows (and setting `errno').
SEE ALSO
fixtof(3alleg4), itofix(3alleg4), fixtoi(3alleg4), exfixed(3alleg4), exrotscl(3alleg4), exspline(3alleg4), exupdate(3alleg4)
Allegro version 4.4.2 ftofix(3alleg4)