Hi,
I would like find for example :
Reduce this fractions to the same denominator 1/3 and 4/9. I calculate
the lcm what it is 9 and I multiplication the 1/3 by 3. This me give 3/9.
Then the answer is 3/9 and 4/9.
Of course I know to do by hand but
Well in the prime I know "comdenom" but this dont' give this answer and
we have use arithmetic operator.
For example SIMPLIFY (42/12,12/16,36/24) give [7/2 3/4 3/2], is it a command
may be I am ignoring it, that give the same for fractions ?
cmd(1/3,4/9)----->[3/9 4/9]
cmd(5/9,7/4,6/11)----->[220/396 693/396 216/396]
Thank.
I'm not sure if there is such a command, but an alternative is to help with variables in the CAS.
With a list of fractions stored in LO:
Here's the equivalent numerators:
EXECON("&1/gcd(L0)",L0);
Each one times the common divisor:
gcd(L0);
-Dale-
Hi,
Very helpfull !
Thank to you both.
(11-28-2017 02:23 PM)DrD Wrote: [ -> ]Here's the equivalent numerators:
EXECON("&1/gcd(L0)",L0);
Each one times the common divisor:
gcd(L0);
Adapted
Divisor: EVAL(1/gcd(exact(L0)))
Numerator list: EXECON("&1/EVAL(gcd(exact(L0)))",L0)
Hi,
Very helpfull !
Thank to you both.
But surely I misunderstand with Carlos.
The idea is to use variables that do not have assigned data, it is possible that in your calculator x, xx have a value, you can use other variables. I used those because they are the ones I can type faster.
Thank once again it run with m, mm for example.
Hi,
I appreciate Carlos and Dale for the elegant formulas
and because I best understand some commands.
(11-28-2017 03:38 PM)Carlos295pz Wrote: [ -> ]Adapted
Divisor: EVAL(1/gcd(exact(L0)))
Numerator list: EXECON("&1/EVAL(gcd(exact(L0)))",L0)
For the numerator you can simply do: L0/EVAL(gcd(exact(L0)))
Hi,
I see a little thing I no understand, sometime there is decimal
instead of integer.
I give example in attachement. Even I try mani things it is no change.
It is not important you know.
(11-28-2017 06:13 PM)Didier Lachieze Wrote: [ -> ]For the numerator you can simply do: L0/EVAL(gcd(exact(L0)))
Or even L0/gcd(exact(L0))
(11-28-2017 07:03 PM)ggauny@live.fr Wrote: [ -> ]Hi,
I see a little thing I no understand, sometime there is decimal
instead of integer.
I give example in attachement. Even I try mani things it is no change.
It is not important you know.
This gets rid of the unwanted real:
Code:
EXPORT TRYG()
BEGIN
LOCAL LL={5/9,7/4,6/11};
LOCAL DD:=1/gcd(exact(LL));
LOCAL NN:=LL*DD;
RETURN {approx(DD),NN};// numerators or
RETURN {approx(DD),exact(NN/DD)}; // fractions
END;
But the fractions are not nice: x/1/1/396 instead of x/396.
Hi,
Taking the idea of Chromos for numerators and applying
to denominator I obtain for example :
LO[1/40 5/24 7/36 12/25]------->[1/40 5/24 7/36 12/25]
LO/gcd(exact(LO))----->[45 375 350 864] //numerators
1/gcd(exact(LO))----->1800 //denominator commun
This avoid the influence of *EVAL* wich give sometimes undesired decimals.
Now I only have to find the good presentation like for example :
45/1800 375/1800 350/1800 864/1800
But this is a new challenge for me !
Thanks to all for help.
Hello,
In CAS program I use this little code :
Code:
#cas
RedFracsss(LO):=
BEGIN
a:=gcd(exact(LO));
PRINT();
PRINT(LO/a);
PRINT(1/a);
END;
#end
In the CAS terminal we see [n, n1, n2......] the numerators
and just below the denominator.
Usefull to verify exercises of my greatgrandson wich learn fractions !
EDIT because little little boy is not good american, the right word is greatgrandson !
In Home program
Code:
EXPORT RedFracssh(l)
BEGIN
LOCAL Div=gcd(exact(l));
PRINT;
PRINT(l/Div);
PRINT(EVAL(1/Div));
END;