🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.lenguajes.php
Article #105

Re: Hacer el modulo de dos numeros grandes (da negativo)

#105
From: Carl
Date: Mon, 10 Aug 2009 19:49
13 lines
1653 bytes
On Aug 10, 9:51 am, Paul <gambam...@yahoo.es> wrote:
> $max=175760000;
> $num=15606252501;
>
> $result= $num % $max --> Esto me muestra un numero negativo.
>
> Como hacer el módulo de dos numeros grandes?
>
> Gracias


Una opción seria usar el modulo GMP.
http://www.php.net/manual/en/function.gmp-mod.php
Technical Details
Message-ID: <5f5ae288-e727-4989-98a2-ca5971418a56@g1g2000pra.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!g1g2000pra.googlegroups.com!not-for-mail
References: <66dedae2-a17d-43c6-8e56-918ffaf7bbd8@n2g2000vba.googlegroups.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f9da90502c,63d5709b0aacee2e
X-Google-Attributes: gidf9da90502c,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: SPANISH,ASCII
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!g1g2000pra.googlegroups.com!not-for-mail
From: Carl <c.groner@gmail.com>
Newsgroups: es.comp.lenguajes.php
Subject: Re: Hacer el modulo de dos numeros grandes (da negativo)
Date: Mon, 10 Aug 2009 12:49:38 -0700 (PDT)
Organization: http://groups.google.com
Lines: 13
Message-ID: <5f5ae288-e727-4989-98a2-ca5971418a56@g1g2000pra.googlegroups.com>
References: <66dedae2-a17d-43c6-8e56-918ffaf7bbd8@n2g2000vba.googlegroups.com>
NNTP-Posting-Host: 64.244.112.194
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1249933795 17582 127.0.0.1 (10 Aug 2009 19:49:55 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 10 Aug 2009 19:49:55 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: g1g2000pra.googlegroups.com; posting-host=64.244.112.194; 
 posting-account=0zA5xwoAAADnrl3eKLVXZolXjfVPNSbM
User-Agent: G2/1.0
X-HTTP-Via: 1.1 WHITNEY
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.1) 
 Gecko/20090716 Ubuntu/9.04 (jaunty) Shiretoko/3.5.1,gzip(gfe),gzip(gfe)