11-07-2010
Thanks, its been seven years since I last used C. I will sudy the gcc command and hopefully not need to ask rooky questions again.
Your answer was spot on.
Last edited by plastichead; 11-07-2010 at 02:07 PM..
Reason: Missed a bit
8 More Discussions You Might Find Interesting
1. Programming
Hi!
when i'm trying to compile this lite example
on my linux machine I'll get errors and i don't know why..
#include <stdio.h>
#include <math.h> /* needed by sqrt() */
int main()
{
printf("%f", sqrt(10.0));
return (0);
}
this is the error:
/tmp/cc33hNVHK.o: In function... (1 Reply)
Discussion started by: CreamHarry
1 Replies
2. Programming
Hi all,
how do i compile a c program into a library on solaris
Thanks in advance
Zing (3 Replies)
Discussion started by: zing
3 Replies
3. Programming
I was writing a simple program in linux, which includes sqrt function of c.
I included the math.h. But when I use gcc to compile it, it gave an error message:
/home/murat/tmp/ccOv9upo.o(.text+0x4b): In function `main':
: undefined reference to `sqrt'
collect2: ld returned 1 exit status
I... (2 Replies)
Discussion started by: murataht
2 Replies
4. Solaris
how dow you complie perl module DBI with mysql from /usr/local/mysql/bin
keeps going to mysql client for /usr/sfw/bin
is it the LD_PATH ???...:confused:
error is
# perl login.cgi
DBI connect('customers;mysql_socket=/tmp/mysql.sock:localhost','root',...) failed: Client does not... (1 Reply)
Discussion started by: photon
1 Replies
5. OS X (Apple)
I am using bash on OSX Leopard.
When I attempt ./configure I get this error:
checking for OPENSSL... configure: error: Package requirements (openssl) were not met:
No package 'openssl' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a... (2 Replies)
Discussion started by: reasonstoprefer
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
i have a the following script:
#!/bin/bash
a=3
b=9
let "c= b*a"
let "d=sqrt $c "
echo $d
But when i execute the code, it gives me the an error saying:
line 5: let: d=sqrt 27 : syntax error in expression (error token is "27 ")
Can any body tell me what I'm doing wrong? (5 Replies)
Discussion started by: limadario
5 Replies
7. Shell Programming and Scripting
Guys,
May i know how can we de reference the code reference variable.?
my $a = sub{$a=shift;$b=shift;print "SUM:",($a+$b),"\n";};
print $a->(4,5);
How can we print the whole function ?
Please suggest me regarding this.
Thanks for your time :)
Cheers,
Ranga :) (0 Replies)
Discussion started by: rangarasan
0 Replies
8. Programming
I would like to compile a binary that doesnot depend on LD_LIBRARY_PATH as this binary will be setuid to owner and used by other users and since setuid doesnot support LD_LIBRARY_PATH making it independent of LD_LIBRARY_PATH would be great.
But I am not able to specify the path of the shared... (1 Reply)
Discussion started by: waavman
1 Replies
sqrt(3M) sqrt(3M)
NAME
sqrt(), sqrtf(), sqrtl(), sqrtw(), sqrtq() - square root functions
SYNOPSIS
HP Integrity Server Only
DESCRIPTION
returns the non-negative square root of x.
is a version of it takes a argument and returns a result.
Integrity Server Only
is a version of it takes a argument and returns a result.
is an version of it takes an argument and returns an result.
is equivalent to on HP-UX systems.
USAGE
To use these functions compile either with the default option or with the and the options.
To use (for Integrity servers) or compile also with the option.
To use any of these functions, make sure your program includes and link in the math library by specifying on the compiler or linker command
line.
For more information, see the at the following site:
RETURN VALUE
If x is +INFINITY, returns +INFINITY.
If x is NaN, returns NaN.
If x is less than zero, returns NaN and raises the invalid floating-point exception.
raises the inexact exception whenever a rounded result does not equal the mathematical result.
ERRORS
If x is less than zero, sets to [EDOM].
Integrity Server Only
HP-UX functions on Integrity servers do not set by default. For setting, compile with the option and the (default) option.
SEE ALSO
cbrt(3M), exp(3M), log(3M), pow(3M), math(5).
STANDARDS CONFORMANCE
: SVID3, XPG4.2, ANSI C, ISO/IEC C99 (including Annex F, ``IEC 60559 floating-point arithmetic'')
: ISO/IEC C99 (including Annex F, ``IEC 60559 floating-point arithmetic'')
sqrt(3M)