Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.advocacy > #497558
| From | owl <owl@rooftop.invalid> |
|---|---|
| Newsgroups | comp.os.linux.advocacy |
| Subject | Re: Famous Hard Problem Solved with GNU/Linux |
| Date | 2019-05-03 03:08 +0000 |
| Organization | O.W.L. |
| Message-ID | <ga800abb.hu43@rooftop.invalid> (permalink) |
| References | (7 earlier) <qaf77501j9m@news3.newsguy.com> <szbvz080ba.buh@rooftop.invalid> <qaf9n1011ov@news2.newsguy.com> <szb8930ga0ga.h@rooftop.invalid> <zxucv993ga.hu4@rooftop.invalid> |
owl <owl@rooftop.invalid> wrote:
> owl <owl@rooftop.invalid> wrote:
>> F. Russell <fr@random.info> wrote:
>>> On Thu, 02 May 2019 17:06:54 +0000, owl wrote:
>>>
>>>>
>>>> Testing implies a reality where the numbers would have meaning.
>>>>
>>>
>>> The only possible place where very large numbers have meaning
>>> is in combinatorics.
>>>
>>> How many ways are there to group N objects into r groups
>>> of size n1, n2, n3 ... nr?
>>>
>>> The answer: N!/(n1! * n2! * n3! * ... *nr!)
>>>
>>> The "!" means "factorial" and the factorials are EXTREMELY large.
>>>
>>> 1000 objects into groups of size 33, 47, and 159:
>>>
>>> 1000!/(33! * 47! * 159!)
>>>
>>> Maxima gives:
>>>
>>> 60807160877193946423884920476447150779204280735648394902172834174368356437979176932949679733159046845220611318486547849810517989753477532269111998429924105670822641108658727309426869464628326146883047778767705759636808032189996671597073595626550103304376642924302659489002863075940126658407990935882774542474414486549012682795445782180432650277601722358261088796349712743773678330498938609041651004305840795566089208206478102572312538523881641679463606750502982552762890437524650840108601641991837141966282469626869439167349606662498514986460242266447513496724901886079264733751395529571160232477484632000455447695671541087239682518624928716672433484574395957372730086886442861485006502895615298726159696938042971830709417229274227093884549850259841117672354583848692727608798045899146314904964626942818082490826030799042502545413186853562714962773715179554568840467560171372596503261515715808713214410292533801628165300900331607082219581917224230519583419900551639396437790369011756366601539978128692815004354525896818143766239422286171812322703878480310040728951715388294010977303802643871663004529587550453959215975072602933256062341172905773893747480028668056163086507425145328025265640450999793742593970313676719220445639719560225914140081366413378660665161983747953322811036551935657912408113935438436896023175462262462753687372035724596774882470981745057797469239465694470850852297096715525404066514612044713598368120142933697603114299658336472402267812187678596899134436447610947674702092193955744933571960612907512015954738689269090188257815297286758185510099008781032438203293461829858505106251416869667775915883511377381179081203036089557388807942193067322564275508933334467312246409566400433586276736884492567441269844929709519226191535152010863460879417996161626169419700041772505617911082318643911178700908232990725329332484380441307829107718238018597741559936801008460021705678242199293142137801238386616054194166727171181943408853604162601414441036265369243293667838578434192179200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
>>>
>>> Because we are dealing with integers the answer is exact.
>>>
>>> But 0.5 indicates an inexact level of precision and thus subject
>>> to the argument of significance.
>>>
>>
>> Bullshit.
>>
>> 1. Multiply by 10
>> 2. Add 5
>> 3. Divide by 10
>>
>
> BTW...
> anon@lowtide:~/code/gmp$ cat goo.c
> #include <gmp.h>
>
> int main(void)
> {
> mpz_t facN, facn1, facn2, facn3, result;
> mpz_init(facN);
> mpz_init(facn1);
> mpz_init(facn2);
> mpz_init(facn3);
> mpz_init(result);
> mpz_fac_ui(facN,1000);
> mpz_fac_ui(facn1,33);
> mpz_fac_ui(facn2,47);
> mpz_fac_ui(facn3,159);
> mpz_mul(facn1,facn1,facn2);
> mpz_mul(facn1,facn1,facn3);
> mpz_div(result,facN,facn1);
> gmp_printf("%Zd\n",result);
> mpz_clear(facN);
> mpz_clear(facn1);
> mpz_clear(facn2);
> mpz_clear(facn3);
> mpz_clear(result);
> return 0;
> }
> anon@lowtide:~/code/gmp$
> anon@lowtide:~/code/gmp$ ./goo
> 60807160877193946423884920476447150779204280735648394902172834174368356437979176932949679733159046845220611318486547849810517989753477532269111998429924105670822641108658727309426869464628326146883047778767705759636808032189996671597073595626550103304376642924302659489002863075940126658407990935882774542474414486549012682795445782180432650277601722358261088796349712743773678330498938609041651004305840795566089208206478102572312538523881641679463606750502982552762890437524650840108601641991837141966282469626869439167349606662498514986460242266447513496724901886079264733751395529571160232477484632000455447695671541087239682518624928716672433484574395957372730086886442861485006502895615298726159696938042971830709417229274227093884549850259841117672354583848692727608798045899146314904964626942818082490826030799042502545413186853562714962773715179554568840467560171372596503261515715808713214410292533801628165300900331607082219581917224230519583419900551639396437790369011756366601539978128692815004354525896818143766239422286171812322703878480310040728951715388294010977303802643871663004529587550453959215975072602933256062341172905773893747480028668056163086507425145328025265640450999793742593970313676719220445639719560225914140081366413378660665161983747953322811036551935657912408113935438436896023175462262462753687372035724596774882470981745057797469239465694470850852297096715525404066514612044713598368120142933697603114299658336472402267812187678596899134436447610947674702092193955744933571960612907512015954738689269090188257815297286758185510099008781032438203293461829858505106251416869667775915883511377381179081203036089557388807942193067322564275508933334467312246409566400433586276736884492567441269844929709519226191535152010863460879417996161626169419700041772505617911082318643911178700908232990725329332484380441307829107718238018597741559936801008460021705678242199293142137801238386616054194166727171181943408853604162601414441036265369243293667838578434192179200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
> anon@lowtide:~/code/gmp$
>
Let's add 0.5 to that...
anon@lowtide:~/code/gmp$ cat loo.c
#include <gmp.h>
int main(void)
{
mpf_set_default_prec(10000);
mpz_t facN, facn1, facn2, facn3, result, addme;
mpf_t f,f1,f2;
mpf_init(f);
mpf_init(f1);
mpf_init(f2);
mpz_init(facN);
mpz_init(facn1);
mpz_init(facn2);
mpz_init(facn3);
mpz_init(result);
mpz_init(addme);
mpz_fac_ui(facN,1000);
mpz_fac_ui(facn1,33);
mpz_fac_ui(facn2,47);
mpz_fac_ui(facn3,159);
mpz_mul(facn1,facn1,facn2);
mpz_mul(facn1,facn1,facn3);
mpz_div(result,facN,facn1);
mpf_set_d(f2,0.5);
mpf_set_z(f1,result);
mpf_add(f,f1,f2);
gmp_printf("%.1Ff\n",f);
mpz_clear(facN);
mpz_clear(facn1);
mpz_clear(facn2);
mpz_clear(facn3);
mpz_clear(result);
mpf_clear(f);
mpf_clear(f1);
mpf_clear(f2);
return 0;
}
anon@lowtide:~/code/gmp$
anon@lowtide:~/code/gmp$ ./loo
60807160877193946423884920476447150779204280735648394902172834174368356437979176932949679733159046845220611318486547849810517989753477532269111998429924105670822641108658727309426869464628326146883047778767705759636808032189996671597073595626550103304376642924302659489002863075940126658407990935882774542474414486549012682795445782180432650277601722358261088796349712743773678330498938609041651004305840795566089208206478102572312538523881641679463606750502982552762890437524650840108601641991837141966282469626869439167349606662498514986460242266447513496724901886079264733751395529571160232477484632000455447695671541087239682518624928716672433484574395957372730086886442861485006502895615298726159696938042971830709417229274227093884549850259841117672354583848692727608798045899146314904964626942818082490826030799042502545413186853562714962773715179554568840467560171372596503261515715808713214410292533801628165300900331607082219581917224230519583419900551639396437790369011756366601539978128692815004354525896818143766239422286171812322703878480310040728951715388294010977303802643871663004529587550453959215975072602933256062341172905773893747480028668056163086507425145328025265640450999793742593970313676719220445639719560225914140081366413378660665161983747953322811036551935657912408113935438436896023175462262462753687372035724596774882470981745057797469239465694470850852297096715525404066514612044713598368120142933697603114299658336472402267812187678596899134436447610947674702092193955744933571960612907512015954738689269090188257815297286758185510099008781032438203293461829858505106251416869667775915883511377381179081203036089557388807942193067322564275508933334467312246409566400433586276736884492567441269844929709519226191535152010863460879417996161626169419700041772505617911082318643911178700908232990725329332484380441307829107718238018597741559936801008460021705678242199293142137801238386616054194166727171181943408853604162601414441036265369243293667838578434192179200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.5
anon@lowtide:~/code/gmp$
Back to comp.os.linux.advocacy | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Famous Hard Problem Solved with GNU/Linux "F. Russell" <fr@random.info> - 2019-04-30 19:34 +0000
Re: Famous Hard Problem Solved with GNU/Linux Snit <usenet@gallopinginsanity.com> - 2019-04-30 12:52 -0700
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <frelwizzen@gmail.com> - 2019-04-30 13:31 -0700
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <frelwizzen@gmail.com> - 2019-05-01 01:15 -0700
Re: Famous Hard Problem Solved with GNU/Linux owl <owl@rooftop.invalid> - 2019-04-30 21:39 +0000
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <frelwizzen@gmail.com> - 2019-04-30 15:21 -0700
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <frelwizzen@gmail.com> - 2019-05-01 02:34 -0700
Re: Famous Hard Problem Solved with GNU/Linux "F. Russell" <frussell@random.info> - 2019-05-01 12:54 +0000
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <frelwizzen@gmail.com> - 2019-05-01 06:13 -0700
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <frelwizzen@gmail.com> - 2019-05-02 07:30 -0700
Re: Famous Hard Problem Solved with GNU/Linux owl <owl@rooftop.invalid> - 2019-05-02 12:46 +0000
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <fretwizzer@gmail.com> - 2019-05-02 06:05 -0700
Re: Famous Hard Problem Solved with GNU/Linux chrisv <chrisv@nospam.invalid> - 2019-05-02 08:38 -0500
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <frelwizzen@gmail.com> - 2019-05-02 06:44 -0700
Re: Famous Hard Problem Solved with GNU/Linux owl <owl@rooftop.invalid> - 2019-05-02 13:53 +0000
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <fretwizzer@gmail.com> - 2019-05-02 07:09 -0700
Re: Famous Hard Problem Solved with GNU/Linux chrisv <chrisv@nospam.invalid> - 2019-05-02 09:15 -0500
Re: Famous Hard Problem Solved with GNU/Linux owl <owl@rooftop.invalid> - 2019-05-02 14:24 +0000
Re: Famous Hard Problem Solved with GNU/Linux "F. Russell" <fr@random.info> - 2019-05-02 15:36 +0000
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <frelwizzen@gmail.com> - 2019-05-02 08:49 -0700
Re: Famous Hard Problem Solved with GNU/Linux "F. Russell" <fr@random.info> - 2019-05-02 16:09 +0000
Re: Famous Hard Problem Solved with GNU/Linux owl <owl@rooftop.invalid> - 2019-05-02 16:26 +0000
Re: Famous Hard Problem Solved with GNU/Linux "F. Russell" <fr@random.info> - 2019-05-02 16:51 +0000
Re: Famous Hard Problem Solved with GNU/Linux owl <owl@rooftop.invalid> - 2019-05-02 17:06 +0000
Re: Famous Hard Problem Solved with GNU/Linux "F. Russell" <fr@random.info> - 2019-05-02 17:34 +0000
Re: Famous Hard Problem Solved with GNU/Linux owl <owl@rooftop.invalid> - 2019-05-02 18:55 +0000
Re: Famous Hard Problem Solved with GNU/Linux owl <owl@rooftop.invalid> - 2019-05-02 23:23 +0000
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <frelwizzen@gmail.com> - 2019-05-02 16:52 -0700
Re: Famous Hard Problem Solved with GNU/Linux owl <owl@rooftop.invalid> - 2019-05-03 03:08 +0000
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <frelwizzen@gmail.com> - 2019-05-03 01:10 -0700
Re: Famous Hard Problem Solved with GNU/Linux "F. Russell" <fr@random.info> - 2019-05-03 23:44 +0000
Re: Famous Hard Problem Solved with GNU/Linux chrisv <chrisv@nospam.invalid> - 2019-05-02 12:16 -0500
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <frelwizzen@gmail.com> - 2019-05-02 10:39 -0700
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <frelwizzen@gmail.com> - 2019-05-02 09:36 -0700
Re: Famous Hard Problem Solved with GNU/Linux owl <owl@rooftop.invalid> - 2019-05-02 16:24 +0000
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <frelwizzen@gmail.com> - 2019-05-02 09:52 -0700
Re: Famous Hard Problem Solved with GNU/Linux AnonLinuxUser <Anon@Linuxusers.net> - 2019-05-02 09:34 -0600
Re: Famous Hard Problem Solved with GNU/Linux AnonLinuxUser <Anon@Linuxusers.net> - 2019-05-02 09:33 -0600
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <frelwizzen@gmail.com> - 2019-05-02 07:15 -0700
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <frelwizzen@gmail.com> - 2019-05-02 06:27 -0700
Re: Famous Hard Problem Solved with GNU/Linux "F. Russell" <fr@random.info> - 2019-05-02 13:58 +0000
Re: Famous Hard Problem Solved with GNU/Linux owl <owl@rooftop.invalid> - 2019-05-02 14:07 +0000
Re: Famous Hard Problem Solved with GNU/Linux chrisv <chrisv@nospam.invalid> - 2019-05-02 09:16 -0500
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <fretwizzer@gmail.com> - 2019-05-02 07:18 -0700
Re: Famous Hard Problem Solved with GNU/Linux "F. Russell" <fr@random.info> - 2019-05-02 14:43 +0000
Re: Famous Hard Problem Solved with GNU/Linux owl <owl@rooftop.invalid> - 2019-05-02 14:54 +0000
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <fretwizzer@gmail.com> - 2019-05-02 08:01 -0700
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <frelwizzen@gmail.com> - 2019-05-02 08:18 -0700
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <fretwizzer@gmail.com> - 2019-05-02 07:17 -0700
Re: Famous Hard Problem Solved with GNU/Linux "F. Russell" <fr@random.info> - 2019-05-02 14:49 +0000
Re: Famous Hard Problem Solved with GNU/Linux chrisv <chrisv@nospam.invalid> - 2019-05-02 10:46 -0500
Re: Famous Hard Problem Solved with GNU/Linux chrisv <chrisv@nospam.invalid> - 2019-05-02 10:51 -0500
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <frelwizzen@gmail.com> - 2019-05-02 09:05 -0700
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <fretwizzer@gmail.com> - 2019-05-02 08:59 -0700
Re: Famous Hard Problem Solved with GNU/Linux Snit <usenet@gallopinginsanity.com> - 2019-05-02 17:05 +0000
Re: Famous Hard Problem Solved with GNU/Linux Steve Carroll <frelwizzen@gmail.com> - 2019-05-02 10:07 -0700
csiph-web