473,382 Members | 1,425 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

sqrt

But I must use only stadnard C!
Nov 14 '05 #1
13 1662
Marcin <mj***@pf.pl> scribbled the following:
But I must use only stadnard C!


Then you've come to the right place.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"I am lying."
- Anon
Nov 14 '05 #2
Marcin wrote:
But I must use only stadnard C!


Check sqrt() from <math.h>.

--
Dirk

(PGP keyID: 0x448BC5DD - http://www.gnupg.org - http://www.pgp.com)

..oO° There's no place like 127.0.0.1 °Oo.
Nov 14 '05 #3
mj***@pf.pl (Marcin) writes:
But I must use only stadnard C!


sqrt() *is* standard C.

What is your real problem?
--
"Some people *are* arrogant, and others read the FAQ."
--Chris Dollin
Nov 14 '05 #4
"Marcin" writes:
But I must use only stadnard C!


IIRC this thread tells you what to do. Write your own big number routine
and use Newton's method. There is nothing there that precludes the use of
standard C. What's your problem?
Nov 14 '05 #5
Marcin wrote:
But I must use only stadnard C!


As I said a few hours ago, the following Numerical Recipes code gives you
arbitrary precision arithmetic.

And its in Standard C.

www.nr.com/
http://www.library.cornell.edu/nr/bookcpdf/c20-6.pdf

gtoomey
Nov 14 '05 #6
"osmium" <r1********@comcast.net> wrote:
"Marcin" writes:
But I must use only stadnard C!


IIRC this thread tells you what to do.


What thread? _This_ thread starts with the post you're replying to.
There was no References header in that post.

Richard
Nov 14 '05 #7
"Richard Bos" writes:
"osmium" <r1********@comcast.net> wrote:
"Marcin" writes:
> But I must use only stadnard C!


IIRC this thread tells you what to do.


What thread? _This_ thread starts with the post you're replying to.
There was no References header in that post.


You are correct, sir! But there was an earlier thread titled <sqrt
precision?!> from a guy named Marcin and this one was also by Marcin and
dealt with a vaguely similar subject. And, IIRC, the earlier thread told
him what to do. I encapsulated what I thought the best advise was in my
full post.
Nov 14 '05 #8
osmium wrote:
"Richard Bos" writes:
"osmium" <r1********@comcast.net> wrote:
"Marcin" writes:

But I must use only stadnard C!

IIRC this thread tells you what to do.


What thread? _This_ thread starts with the post you're replying to.
There was no References header in that post.


You are correct, sir! But there was an earlier thread titled <sqrt
precision?!> from a guy named Marcin and this one was also by Marcin
and dealt with a vaguely similar subject. And, IIRC, the earlier
thread told him what to do. I encapsulated what I thought the best
advise was in my full post.


Put the blame where it belongs - on the ridiculous brain dead
google interface without quotes and without references. I suggest
selling their stock short - they seem to have suddenly lost their
technical capability and even the ability to correct that.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
Nov 14 '05 #9
Richard Bos wrote:
"osmium" <r1********@comcast.net> wrote:
IIRC this thread tells you what to do.

What thread? _This_ thread starts with the post you're replying to.
There was no References header in that post.


Whachutalkin'bout, Willis?
References: <41**************************@posting.google.com >

--
To the Republic Party:
"..[N]othing could be more ill-judged than that intolerant spirit which
has, at all times, characterized political parties. For in politics, as
in religion, it is equally absurd to aim at making proselytes by fire
and sword. Heresies in either can rarely be cured by persecution."
- Federalist #1 (Hamilton)
Nov 14 '05 #10
On Mon, 31 Jan 2005 12:41:40 -0500, Martin Ambuhl
<ma*****@earthlink.net> wrote:
Richard Bos wrote:
"osmium" <r1********@comcast.net> wrote:

IIRC this thread tells you what to do.

What thread? _This_ thread starts with the post you're replying to.
There was no References header in that post.


Whachutalkin'bout, Willis?
References: <41**************************@posting.google.com >


You need one more level of indirection ;-)

--
Al Balmer
Balmer Consulting
re************************@att.net
Nov 14 '05 #11
Martin Ambuhl <ma*****@earthlink.net> wrote:
Richard Bos wrote:
"osmium" <r1********@comcast.net> wrote:

IIRC this thread tells you what to do.

What thread? _This_ thread starts with the post you're replying to.
There was no References header in that post.


Whachutalkin'bout, Willis?
References: <41**************************@posting.google.com >


That's the References header in osmium's post, which was correct, not in
the post he replied to, which was (presumably) broken.

Richard
Nov 14 '05 #12
Marcin wrote:

But I must use only stadnard C!


http://groups.google.co.uk/groups?se...mindspring.com

--
pete
Nov 14 '05 #13
CBFalconer wrote:

osmium wrote:
"Richard Bos" writes:
"osmium" <r1********@comcast.net> wrote:
"Marcin" writes:

> But I must use only stadnard C!

IIRC this thread tells you what to do.

What thread? _This_ thread starts with the post you're replying to.
There was no References header in that post.


You are correct, sir! But there was an earlier thread titled <sqrt
precision?!> from a guy named Marcin and this one was also by Marcin
and dealt with a vaguely similar subject. And, IIRC, the earlier
thread told him what to do. I encapsulated what I thought the best
advise was in my full post.


Put the blame where it belongs - on the ridiculous brain dead
google interface without quotes and without references. I suggest
selling their stock short - they seem to have suddenly lost their
technical capability and even the ability to correct that.


Is this old style google any better?

http://groups.google.co.uk/
http://groups.google.co.uk/groups?hl...up=comp.lang.c

--
pete
Nov 14 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Prune Tracy | last post by:
Hi, I can't get this seemingly harmless code to compile with Comeau online. #include <cmath> typedef float (*float_func)(float); typedef double (*double_func)(double); int main() {...
10
by: pauldepstein | last post by:
I am writing a program which will use the ceiling and floor of square roots. If a positive integer is an exact square (and is not overly huge), does sqrt return an integer-valued real? Or...
7
by: Aric | last post by:
Hi, I'm a bit new to programming in general, really I've just picked it up as a hobby, and so I've started by reading "Practical C Programming" by Steve Oualline. Things have been going fine in...
1
by: Reiner Apke | last post by:
Hello, I have got a very strange problem with the calcualtion of the the square root (Math.Sqrt()). I calculate in a loop a lot of of diameters maxDiameter = Math.Sqrt(maxCrossSection *...
13
by: Michael McNeil Forbes | last post by:
I would like to write a module that provides some mathematical functions on top of those defined in math, cmath etc. but I would like to make it work with "any" type that overloads the math...
12
by: Thomas Zhu | last post by:
hello all, n is an 32bit-integer, how to calculate sqrt(n) I know high(n) is the the value, but how to use bit operation to implement this function. thanks in advance. yours Yin
14
by: peng.xiaoyu | last post by:
hello everyone, why this c code can be compiled and linked without -lm? #include<math.h> #include<stdio.h> int main() { printf("%f\n",sqrt(2.0)); return 0;
13
by: siggi | last post by:
Hi all, this is a newbie question on : Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) on win32 PC with WinXP In http://www.python.org/doc/2.3.5/lib/module-math.html I read:
30
by: copx | last post by:
I am writing a program which uses sqrt() a lot. A historically very slow function but I read on CPUs with SSE support this is actually fast. Problem: C's sqrt() (unlike C++ sqrt()) is defined to...
13
by: =?Utf-8?B?RXRoYW4gU3RyYXVzcw==?= | last post by:
Hi, Why does Math.Sqrt() only accept a double as a parameter? I would think it would be just as happy with a decimal (or int, or float, or ....). I can easily convert back and forth, but I am...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.