Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
denominator
- Page 1
Re: Lowest Common Denominator
Programming
Software Development
19 Years Ago
by WolfPack
… the algorithm of determining how to get the lowest common
denominator
in order to be able to easily add the fractions….[/QUOTE] Why on earth do you want the lowest common
denominator
to add the fractions?? Can't you just add them…
Re: Lowest Common Denominator
Programming
Software Development
19 Years Ago
by riscphree
Well, in order to add them, I need to get them to have the same
denominator
, correct? If they have the same
denominator
, thats no problem. Am I going in the wrong direction with this?
Re: least common denominator
Programming
Software Development
14 Years Ago
by Katana24
… go about writing a program to find the least common
denominator
? greatest common divisor? etc.. I was wondering if there is…] now what to do?[/QUOTE] To find the least common
denominator
or anything like it I would have a variable of…
Lowest Common Denominator
Programming
Software Development
19 Years Ago
by riscphree
… the algorithm of determining how to get the lowest common
denominator
in order to be able to easily add the fractions…
Getting numerator and denominator from Fraction
Programming
Software Development
15 Years Ago
by debragail
… continued fractions. I'm having trouble separating the numerator and
denominator
from the returned value. [code=python]def cf3(terms, iterations…
Re: Getting numerator and denominator from Fraction
Programming
Software Development
15 Years Ago
by Gribouillis
If f is a fraction, you can use f.
denominator
and f.numerator. See also this snippet [url]http://www.daniweb.com/code/snippet223956.html[/url].
least common denominator
Programming
Software Development
14 Years Ago
by DeIntegro
… go about writing a program to find the least common
denominator
? greatest common divisor? etc.. I was wondering if there is…
Re: least common denominator
Programming
Software Development
14 Years Ago
by coil
EDIT: Oops. You meant LCM - lowest common
denominator
. In that case, still, use mod command (%). It will let you see if a number is divisible. If a%b=0, then a is a multiple of b.
Re: least common denominator
Programming
Software Development
14 Years Ago
by DeIntegro
it's actually least common
denominator
...you could say least common multiple i guess...i'm …
Re: Lowest Common Denominator
Programming
Software Development
19 Years Ago
by WolfPack
Let's go with your example. [code]/********************************************* * math: 1/R = 1/R1 + 1/R2 + 1/R3 ... + 1/Rn * * ex: 1/R = 1/400 + 1/200 * * 1/R = 3/400 * * R = 400/3 * * R = 133.33 ohms * …
Re: Lowest Common Denominator
Programming
Software Development
19 Years Ago
by Rashakil Fol
In C and C++, the 'double' datatype can be used to store approximations of the real numbers. For example, [inlinecode]double x = 3.5;[/inlinecode]. Use doubles to store all your resistances, and then you can do approximate arithmetic on them. These approximations can store about fourteen decimal digits of precision. They're like numbers in a …
Re: Lowest Common Denominator
Programming
Software Development
19 Years Ago
by riscphree
WolfPack, thanks, that last suggestion of yours made sense. I think I can build off that. :)
Re: Getting numerator and denominator from Fraction
Programming
Software Development
15 Years Ago
by debragail
Thank you Gribouillis!
Re: least common denominator
Programming
Software Development
14 Years Ago
by coil
Sorry about the LCM acronym confusion. Yeah, I confused myself too. Yes, what the above code segment is referring to is Euclid's algorithm to find GCF/GCD. The algorithm is as follows: the GCF of a and b is equivalent to the GCF of b and a%b, which of course is a recursive function. Eventually, a%b=0, in which case b is the GCF. The LCM can be …
Re: Still needing Binomial Code Help.....
Programming
Software Development
15 Years Ago
by mrnutty
>>
denominator
= 1*2*...*k I hope you know thats not valid. … factorial of K So if K was 5, the the
denominator
will be 1 * 2 * 3 * 4 * 5. So make a…. So if num was 5, then the call would be :
denominator
= factorial(5); // = 120 Fix that then post back, because there…
class within a class
Programming
Software Development
17 Years Ago
by torbecire
… F2 TO IMPROPER // SETS NUMERATOR,
DENOMINATOR
, AND WHOLE numerator = (temp.numerator *temp2.
denominator
) + (temp.
denominator
*temp2.numerator);
denominator
= temp.
denominator
* temp2.
denominator
; whole = 0; reduce(); // CALLS…
help
Programming
Software Development
15 Years Ago
by blamp
… fractions fractions :: operator/(fractions f) { fractions temp; temp.
denominator
=
denominator
* f.
denominator
; temp.numerator = numerator * f.
denominator
/
denominator
* f.numerator; return temp; } fractions::fractions() { numerator…
help please!
Programming
Software Development
15 Years Ago
by blamp
… fractions fractions :: operator/(fractions f) { fractions temp; temp.
denominator
=
denominator
* f.
denominator
; temp.numerator = numerator * f.
denominator
/
denominator
* f.numerator; return temp; } fractions::fractions() { numerator…
Rational Number Constructor
Programming
Software Development
18 Years Ago
by dmmckelv
…=#0000ff]return[/color] Rational(numerator * x.
denominator
+
denominator
* x.
denominator
,
denominator
* x.
denominator
); } Rational Rational::[color=#0000ff]operator[/color]-([…=#0000ff]return[/color] Rational(numerator * x.
denominator
-
denominator
* x.
denominator
,
denominator
* x.
denominator
); } Rational Rational::[color=#0000ff]operator[/color…
does this CLASS work?
Programming
Software Development
17 Years Ago
by torbecire
… TO IMPROPER f1.numerator *= f2.
denominator
; f1.
denominator
*= f2.
denominator
; // SETS NUMERATOR,
DENOMINATOR
, AND WHOLE numerator = f1.numerator * f2.
denominator
;
denominator
=f1.
denominator
* f2.numerator; whole = 0…
Re: does this CLASS work?
Programming
Software Development
17 Years Ago
by torbecire
… F2 TO IMPROPER // SETS NUMERATOR,
DENOMINATOR
, AND WHOLE numerator = (temp.numerator *temp2.
denominator
) + (temp.
denominator
*temp2.numerator);
denominator
= temp.
denominator
* temp2.
denominator
; whole = 0; reduce(); // CALLS…
Polynomial with rational coefficients
Programming
Software Development
15 Years Ago
by RayRay1
… = numerator * operand2.
denominator
; // (ad) t.numerator +=
denominator
* operand2.numerator; // (ad + bc) t.
denominator
=
denominator
* operand2.
denominator
; // formula (ad …t.numerator = numerator * operand2.numerator; // (ac) t.
denominator
=
denominator
* operand2.
denominator
; // formula (ac)/(bd) t.reduction(); return t; } …
Summation Program with BigInteger Rational Class
Programming
Software Development
11 Years Ago
by thewayoftheduck
… field for numerator BigInteger numerator; //data field for
denominator
BigInteger
denominator
; //construct a BigInteger rational with default BigInteger properties …new BigInteger("1")).multiply(numerator.divide(gcd)); this.
denominator
=
denominator
.divide(gcd); } //find the GCD of two BigInteger…
Problem in Fraction Calculator
Programming
Software Development
11 Years Ago
by angel06
… = gcd(); if (gcdNum != 0) { Numerator = Numerator / gcdNum;
Denominator
=
Denominator
/ gcdNum; } if (
Denominator
< 0) {
Denominator
=
Denominator
* -1; Numerator = Numerator * -1…
fraction
Programming
Software Development
18 Years Ago
by nono909
…return rationalClass(left.numerator*right.
denominator
+ right.numerator*left.
denominator
, left.
denominator
*right.
denominator
); } rationalClass operator +(const…return rationalClass(left.numerator*right.
denominator
+ right.numerator*left.
denominator
, left.
denominator
*right.
denominator
); } rationalClass operator -(const…
int mixed always returns huge negative number
Programming
Software Development
18 Years Ago
by dmmckelv
… Rational(mixed + x.mixed, numerator * x.
denominator
+ x.numerator *
denominator
,
denominator
* x.
denominator
); } Rational Rational::[color=#0000ff]operator[/color]-([color=#… Rational(mixed - x.mixed, numerator * x.
denominator
- x.numerator *
denominator
,
denominator
* x.
denominator
); } Rational Rational::[color=#0000ff]operator[/color]*([color=#…
C++ Fraction Program problem
Programming
Software Development
15 Years Ago
by winson.thai
…result; result.setFraction(numerator * rhs.
denominator
+ rhs.numerator *
denominator
,
denominator
* rhs.
denominator
); return result; } RationalNumbers RationalNumbers::operator…result; result.setFraction(numerator * rhs.
denominator
- rhs.numerator *
denominator
,
denominator
* rhs.
denominator
); return result; } RationalNumbers RationalNumbers::…
Rational Number class
Programming
Software Development
15 Years Ago
by e30rapidic
…Rational(int numerator, int
denominator
) { this->numerator = numerator; //this->
denominator
=
denominator
; if(
denominator
==0) { this->
denominator
= 1; }// end…Rational::reduction() { int largest; largest = numerator >
denominator
? numerator :
denominator
; int gcd = 0; // greatest common divisor for (…
Re: Rational Number class
Programming
Software Development
15 Years Ago
by e30rapidic
… fractions { Rational t; t.numerator = a.numerator *
denominator
; t.numerator += a.
denominator
* numerator; t.
denominator
= a.
denominator
*
denominator
; t.reduction(); return t; } Rational Rational::subtraction…
Rational Class
Programming
Software Development
14 Years Ago
by mike42intn
…Rational t; t.numerator = a.numerator *
denominator
+ a.
denominator
* numerator; t.
denominator
= a.
denominator
*
denominator
; t.reduction(); return t; } Rational …Rational t; t.numerator = s.numerator *
denominator
- s.
denominator
* numerator; t.
denominator
= s.
denominator
*
denominator
; t.reduction(); return t; } Rational …
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
Backlink Auditor
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC