On 22 April 2010 17:47, Developer Team d...@thebat.net wrote:
Awesome source.
Thanks
On 4/22/10, Richard Quadling rquadl...@googlemail.com wrote:
On 22 April 2010 14:48, Dan Joseph dmjos...@gmail.com wrote:
On Thu, Apr 22, 2010 at 10:29 AM, Richard Quadling
rquadl...@googlemail.com
wrote:
On 22 April 2010 17:07, Dan Joseph dmjos...@gmail.com wrote:
Howdy,
This is a math question, but I'm doing the code in PHP, and have expunged
all resources... hoping someone can guide me here. For some reason, I can't
figure this out.
I want to take a group of items, and divide them into
On 23 April 2010 13:33, Dotan Cohen dotanco...@gmail.com wrote:
What is wrong with 626,299 groups of 2 items each (done in my head, so
I might be off a little)?
2, 3, 6, 7, 14 and 21 are all valid.
--
-
Richard Quadling
Standing on the shoulders of some very clever giants!
EE :
At 10:17 AM -0400 4/22/10, Dan Joseph wrote:
On Thu, Apr 22, 2010 at 10:12 AM, Stephen stephe...@rogers.com wrote:
1,252,398 DIV 30 = 41,746 groups of 30.
1,252,398 MOD 30 = 18 items in last group
Well, the only problem with going that route, is the one group is not
equally sized to the
?php
function findBestFactors($Value, $GroupSize = INF)
{
foreach(range(min($GroupSize, ceil(sqrt($Value))), 1) as $Factor)
{
if (0 == ($Value % $Factor))
{
return array($Factor, $Value / $Factor);
Dan Joseph wrote:
I want to take a group of items, and divide them into equal groups based on
a max per group. Example.
1,252,398 -- divide into equal groups with only 30 items per group max.
1,252,398 DIV 30 = 41,746 groups of 30.
1,252,398 MOD 30 = 18 items in last group
Stephen
--
On Thu, Apr 22, 2010 at 10:12 AM, Stephen stephe...@rogers.com wrote:
1,252,398 DIV 30 = 41,746 groups of 30.
1,252,398 MOD 30 = 18 items in last group
Well, the only problem with going that route, is the one group is not
equally sized to the others. 18 is ok for a group in this instance,
On Thu, 2010-04-22 at 10:17 -0400, Dan Joseph wrote:
On Thu, Apr 22, 2010 at 10:12 AM, Stephen stephe...@rogers.com wrote:
1,252,398 DIV 30 = 41,746 groups of 30.
1,252,398 MOD 30 = 18 items in last group
Well, the only problem with going that route, is the one group is not
equally
On 22 April 2010 15:13, Ashley Sheridan a...@ashleysheridan.co.uk wrote:
On Thu, 2010-04-22 at 10:17 -0400, Dan Joseph wrote:
On Thu, Apr 22, 2010 at 10:12 AM, Stephen stephe...@rogers.com wrote:
1,252,398 DIV 30 = 41,746 groups of 30.
1,252,398 MOD 30 = 18 items in last group
Well,
On 22 April 2010 15:26, Richard Quadling rquadl...@googlemail.com wrote:
On 22 April 2010 15:13, Ashley Sheridan a...@ashleysheridan.co.uk wrote:
On Thu, 2010-04-22 at 10:17 -0400, Dan Joseph wrote:
On Thu, Apr 22, 2010 at 10:12 AM, Stephen stephe...@rogers.com wrote:
1,252,398 DIV 30 =
-Original Message-
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: 22 April 2010 15:13
To: Dan Joseph
Cc: PHP eMail List
Subject: Re: [PHP] Math Question
On Thu, 2010-04-22 at 10:17 -0400, Dan Joseph wrote:
On Thu, Apr 22, 2010 at 10:12 AM, Stephen stephe
On Thu, Apr 22, 2010 at 10:29 AM, Richard Quadling rquadl...@googlemail.com
wrote:
It sounds like you are looking for factors.
http://www.algebra.com/algebra/homework/divisibility/factor-any-number-1.solver
Solution by Find factors of any number
1252398 is NOT a prime number:
On Thu, 22 Apr 2010 10:17:10 -0400
Dan Joseph dmjos...@gmail.com wrote:
On Thu, Apr 22, 2010 at 10:12 AM, Stephen stephe...@rogers.com
wrote:
1,252,398 DIV 30 = 41,746 groups of 30.
1,252,398 MOD 30 = 18 items in last group
Well, the only problem with going that route, is the one
On Thu, 22 Apr 2010 10:49:11 -0400
Peter van der Does pvanderd...@gmail.com wrote:
My take on it:
$Items=1252398;
$MaxInGroup=30;
for ($x=$MaxInGroup; $x1;$x--) {
$remainder=$Items % $x;
// Change 17 to the max amount allowed in the last group
if ($remainder == 0 ||
On 22 April 2010 14:48, Dan Joseph dmjos...@gmail.com wrote:
On Thu, Apr 22, 2010 at 10:29 AM, Richard Quadling rquadl...@googlemail.com
wrote:
It sounds like you are looking for factors.
http://www.algebra.com/algebra/homework/divisibility/factor-any-number-1.solver
Solution by
On Thu, Apr 22, 2010 at 12:16 PM, Richard Quadling rquadl...@googlemail.com
wrote:
On 22 April 2010 14:48, Dan Joseph dmjos...@gmail.com wrote:
This seems to be working ...
?php
function findBestFactors($Value, $GroupSize, array $Factors = null)
{
$Factors = array();
Hello Jeremy,
Wednesday, February 11, 2004, 2:00:32 PM, you wrote:
JS Is there a function that when you divide 2 numbers you drop the
JS remainder and are left with the whole number.
round($number1 / $number2)
See the manual for the precision value if you need it.
--
Best regards,
Richard
Seems to me you need
floor($number1 / $number2)
Vincent
-Original Message-
From: Richard Davey [mailto:[EMAIL PROTECTED]
Sent: woensdag 11 februari 2004 15:07
To: Jeremy Schroeder
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Math Question
Hello Jeremy,
Wednesday, February 11, 2004, 2
Thanks for all the help, floor() was the correct choice for this problem .
-Blake
Vincent Jansen wrote:
Hi Richard
I agree
But you always want to round down ;)
Blake Is there a function that when you divide 2 numbers you drop the
Blake remainder and are left with the whole number.
Still
Jeremy Schroeder wrote:
Hey group
Is there a function that when you divide 2 numbers you drop the
remainder and are left with the whole number.
A whole section of the manual dedicated to mathematical functions!
http://us4.php.net/manual/en/ref.math.php
floor()
ceil()
round()
--
By-Tor.com
Mike D [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
I'm am completely stumped on a seemingly simple math formula
I need to find a way to map a set of numbers up to 4 (e.g. 1,2,3,4 or 1,2)
to any number in a range of up to 10,000 (ideally, unlimited). Such that,
(e.g. 1,2,3,4)
I do not know if I understand well, but what about
$group=$number % 4;
if ($group==0) $group=4;
Brona
-Original Message-
From: Eric Bolikowski [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 10:53 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: PHP Math Question
PROTECTED]
Sent: Thursday, December 11, 2003 5:22 PM
Subject: RE: [PHP] Re: PHP Math Question
| I do not know if I understand well, but what about
|
| $group=$number % 4;
| if ($group==0) $group=4;
|
| Brona
|
| -Original Message-
| From: Eric Bolikowski [mailto:[EMAIL PROTECTED
Mike D [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I'm am completely stumped on a seemingly simple math formula
I need to find a way to map a set of numbers up to 4 (e.g. 1,2,3,4 or 1,2)
to any number in a range of up to 10,000 (ideally, unlimited). Such that,
(e.g. 1,2,3,4)
1
: Bronislav Kluèka [EMAIL PROTECTED]
To: Eric Bolikowski [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 5:22 PM
Subject: RE: [PHP] Re: PHP Math Question
| I do not know if I understand well, but what about
|
| $group=$number % 4;
| if ($group==0) $group=4;
|
| Brona
Julia A. Case [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
$theta = 15*pi/360;
gives a value of 0 for $theta... it should be something like 0.131...
Julia
I get
echo 15 * M_PI / 360;
returns
0.13089969389957
--
PHP General Mailing List
pi is a function. Try this:
$theta = 15*pi()/360;
It should return 0.13089969389957
-Evan Nemerson
$theta = 15*pi/360;
gives a value of 0 for $theta... it should be something like 0.131...
Julia
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL
Have you defined the 'pi' constant?
If you are trying to use PHP's built-in PI constant, it is named 'M_PI'
Perhaps consider increasing your error reporting level so that PHP reports
problems like undefined constants - see error_reporting() for more details.
--zak
- Original Message -
If u don't want to use the pi() function.
Try M_PI. This is a pi constant its value is 3.14159265358979323846
$theta=15*M_PI/360;
- Original Message -
From: Anon Y Mous [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, June 23, 2001 2:21 PM
Subject: Re: [PHP] math question
pi
29 matches
Mail list logo