LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-14-2010, 11:13 AM   #1
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Rep: Reputation: 31
math functions like sqrt?


I have a user that wants to use basic math functions from the command line like sqrt and such. Apparently it was installed on the previous server we were using, but not on this new Debian server by default.

Anyone know what package has that functionality?
 
Old 09-14-2010, 11:15 AM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Maybe `bc`, the "basic calculator" ? There are other similar ones but this is the first one that comes to mind for me.
 
Old 09-14-2010, 11:27 AM   #3
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31
that's something, but doesn't let you call c style math functions from the commandline

the previous OS was Suse Linux 10
 
Old 09-14-2010, 11:31 AM   #4
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Sounds like maybe you're looking for `calc`, according to these:
http://rpmfind.net/linux/RPM/Suse_Linux_10.html
http://www.isthe.com/chongo/tech/comp/calc/
and based on a quick Google.
 
1 members found this post helpful.
Old 09-14-2010, 10:11 PM   #5
alan99
Member
 
Registered: Mar 2010
Distribution: Debian
Posts: 180

Rep: Reputation: 31
Just about every linux distro probably has perl installed.

Just type this at the command line
Quote:
perl <&1
This let you enter a "quick and dirty" perl program to stdin
Quote:
print (sqrt(25),"\n");
(hit enter at the end of the line and then Ctl-D on the next empty line.
It should return 5 (the square root of 25)

Last edited by alan99; 09-14-2010 at 10:12 PM.
 
Old 09-15-2010, 11:13 AM   #6
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31
OK


I misunderstood what the user wanted. The user wants to type:

man sqrt

...and get a man page for the C function sqrt. Apparently this works on Cygwin and it worked on the old Suse Linux 10 box.

Anyone know what I can install to access info about C functions as man pages?

Last edited by davidstvz; 09-15-2010 at 11:19 AM.
 
Old 09-15-2010, 11:32 AM   #7
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
So you are asking what package contains the file that has sqrt.3 as part of its filename.

If you have apt-file search installed and set up, you could use that for such questions.

If you want to do such searches online, the Ubuntu answer is easy to get from
http://packages.ubuntu.com/
and the Ubuntu answer regarding most package names is the same as the package name in other Debian based distributions.

For sqrt.3, the Ubuntu answer is at
http://packages.ubuntu.com/search?se...lucid&arch=any

In that answer, if you ignore the language and otherwise over specialized choices, you can spot the general choice, which is the package manpages-dev

I assume you know how to install that package.

Last edited by johnsfine; 09-15-2010 at 11:35 AM.
 
1 members found this post helpful.
Old 09-15-2010, 02:38 PM   #8
alan99
Member
 
Registered: Mar 2010
Distribution: Debian
Posts: 180

Rep: Reputation: 31
If you want a gui interface for man pages, there is x man or if there is a web server on that machine, there is Dwww for debian which allows you to search man pages from a web interface.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking up math functions for C programming on Linux AJones Linux - Software 7 12-15-2009 10:19 PM
Availability of math functions within the kernel opsimath Linux - Kernel 2 03-19-2009 12:20 AM
c and math functions davidleroux1 Programming 8 09-14-2006 09:47 PM
math program that I can enter math functions ... Four General 5 04-19-2006 08:02 PM
functions in math.h philgar Slackware 3 03-27-2005 05:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration