FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Math Formula Question - Need Ideas
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Math Formula Question - Need Ideas [message #184514] Sun, 05 January 2014 00:26 Go to next message
Adrienne Boswell is currently offline  Adrienne Boswell
Messages: 25
Registered: October 2010
Karma: 0
Junior Member
I have a math question to which I can't find the answer. Here is the
scenario:

Someone goes to a store and has $100.00 worth of items. The merchant
gives the customer a 10% discount, so only $90.00 is sent to the bank.
Of the original amount, $10.00 goes to the customer for the discount,
$80.00 goes to the merchant, $10.00 goes for a processing fee. But those
amounts have to be calced on the original amount, not what the bank got.
I need a formula to find the original amount if I have the percentage
(10%) and the amount the bank got ($90.00). I know in my head that the
original amount is $100.00, but I have to do it programatically.

I know this is probably dead simple, but I just can't get my head around
it.

Thanks in advance.

--
Adrienne Boswell
Arbpen Web Site Design Services - http://www.cavalcade-of-coding.info/
The Good Plate - Fresh Gourmet Recipes - http://the-good-plate.com/
Please respond to the group so others can share
Re: Math Formula Question - Need Ideas [message #184515 is a reply to message #184514] Sun, 05 January 2014 00:33 Go to previous messageGo to next message
Richard Damon is currently offline  Richard Damon
Messages: 58
Registered: August 2011
Karma: 0
Member
On 1/4/14, 7:26 PM, Adrienne Boswell wrote:
> I have a math question to which I can't find the answer. Here is the
> scenario:
>
> Someone goes to a store and has $100.00 worth of items. The merchant
> gives the customer a 10% discount, so only $90.00 is sent to the bank.
> Of the original amount, $10.00 goes to the customer for the discount,
> $80.00 goes to the merchant, $10.00 goes for a processing fee. But those
> amounts have to be calced on the original amount, not what the bank got.
> I need a formula to find the original amount if I have the percentage
> (10%) and the amount the bank got ($90.00). I know in my head that the
> original amount is $100.00, but I have to do it programatically.
>
> I know this is probably dead simple, but I just can't get my head around
> it.
>
> Thanks in advance.
>
10% is 0.1

You got the $90 by multiplying the original $100 by (1-0.1) to get $90,
so you can divide the $90 by (1 - 0.1) to get the original $100
Re: Math Formula Question - Need Ideas [message #184516 is a reply to message #184514] Sun, 05 January 2014 00:37 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
On 05/01/14 00:26, Adrienne Boswell wrote:
> I have a math question to which I can't find the answer. Here is the
> scenario:
>
> Someone goes to a store and has $100.00 worth of items. The merchant
> gives the customer a 10% discount, so only $90.00 is sent to the bank.
> Of the original amount, $10.00 goes to the customer for the discount,

no., The customer gets the goods.

> $80.00 goes to the merchant,
If you say so

$10.00 goes for a processing fee.

who gets that?

But those
> amounts have to be calced on the original amount, not what the bank got.
> I need a formula to find the original amount if I have the percentage
> (10%) and the amount the bank got ($90.00). I know in my head that the
> original amount is $100.00, but I have to do it programatically.
>

are you for real?

$90/(1-0.1) = $100

0.1 being 10%..

> I know this is probably dead simple, but I just can't get my head around
> it.
>
A degree in media studies...or was it 'climate science' ?...;-)

> Thanks in advance.
>


--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.
Re: Math Formula Question - Need Ideas [message #184517 is a reply to message #184514] Sun, 05 January 2014 00:54 Go to previous messageGo to next message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma: 0
Senior Member
On Sun, 05 Jan 2014 00:26:08 +0000, Adrienne Boswell wrote:

> I have a math question to which I can't find the answer. Here is the
> scenario:
>
> Someone goes to a store and has $100.00 worth of items. The merchant
> gives the customer a 10% discount, so only $90.00 is sent to the bank.
> Of the original amount, $10.00 goes to the customer for the discount,
> $80.00 goes to the merchant, $10.00 goes for a processing fee. But
> those amounts have to be calced on the original amount, not what the
> bank got. I need a formula to find the original amount if I have the
> percentage (10%) and the amount the bank got ($90.00). I know in my
> head that the original amount is $100.00, but I have to do it
> programatically.
>
> I know this is probably dead simple, but I just can't get my head around
> it.
>
> Thanks in advance.

If a * b = c then

a = c / b

b = c / a

In your case, 100 * 0.9 = 90

Therefore to get the original,

90 / 0.9 = 100

0.9 being the decimal fraction that equates to 90%, ie the amount the
customer paid after discount.

Observation though, processing fees are usually a % of the amount paid.

eg if a card payment processing service charges 1.25%, that would be
1.25% of the payments made, so in your case:

Invoice: = 100.00
Discount: 10% = 10.00
Amount due: = 90.00
========================
Processing: 10% = 9.00
Amount to bank: = 81.00

The payment processing is only concerned with the amount of the
transaction that it actually processes, not some other intermediate
calculation between the merchant and the customer.

Consider the case where the customer is given a 95% discount by the
store. If your processing service still charges 10% of the original
amount, the your processing fee is more than actual transaction value:

Invoice: = 100.00
Discount: 10% = 95.00
Amount due: = 5.00
==================================
Processing: 10% of 100.00 = 10.00
Amount to bank: = -5.00 ???? Error

The correct math for this case is more likely:

Invoice: = 100.00
Discount: 10% = 95.00
Amount due: = 5.00
========================
Processing: 10% = 0.50
Amount to bank: = 4.50

As a general rule, payment processing systems only concern themselves
with the amounts that they are handling, and not other amounts that may
have appeared in calculations made outside of their own systems.

Of course, if you're working on something like a sales commission basis,
that might be a different set of rules, as you might expect to be
receiving a commission based on the listed price, regardless of whether
the items are sold at a discount or not.

--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
Re: Math Formula Question - Need Ideas [message #184518 is a reply to message #184516] Sun, 05 January 2014 01:20 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 1/4/2014 7:37 PM, The Natural Philosopher wrote:
> On 05/01/14 00:26, Adrienne Boswell wrote:
>> I have a math question to which I can't find the answer. Here is the
>> scenario:
>>
>> Someone goes to a store and has $100.00 worth of items. The merchant
>> gives the customer a 10% discount, so only $90.00 is sent to the bank.
>> Of the original amount, $10.00 goes to the customer for the discount,
>
> no., The customer gets the goods.
>

Plus $10.00 of the original $100.00

>> $80.00 goes to the merchant,
> If you say so
>

That's one of the original conditions.

> $10.00 goes for a processing fee.
>
> who gets that?
>

Maybe a credit card processor? Maybe the product is being shipped and
this is postage and handling? Who knows.

More importantly, it doesn't matter. It's another of the original
conditions.

> But those
>> amounts have to be calced on the original amount, not what the bank got.
>> I need a formula to find the original amount if I have the percentage
>> (10%) and the amount the bank got ($90.00). I know in my head that the
>> original amount is $100.00, but I have to do it programatically.
>>
>
> are you for real?
>
> $90/(1-0.1) = $100
>
> 0.1 being 10%..
>

Well, we know you can do first grade math, anyway. But then the OP SAID
it was 10%. Maybe you have some problem understanding him?

>> I know this is probably dead simple, but I just can't get my head around
>> it.
>>
> A degree in media studies...or was it 'climate science' ?...;-)
>
>> Thanks in advance.
>>
>
>

Maybe you should get your second grade education.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Math Formula Question - Need Ideas [message #184519 is a reply to message #184517] Sun, 05 January 2014 01:22 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 1/4/2014 7:54 PM, Denis McMahon wrote:
> On Sun, 05 Jan 2014 00:26:08 +0000, Adrienne Boswell wrote:
>
>> I have a math question to which I can't find the answer. Here is the
>> scenario:
>>
>> Someone goes to a store and has $100.00 worth of items. The merchant
>> gives the customer a 10% discount, so only $90.00 is sent to the bank.
>> Of the original amount, $10.00 goes to the customer for the discount,
>> $80.00 goes to the merchant, $10.00 goes for a processing fee. But
>> those amounts have to be calced on the original amount, not what the
>> bank got. I need a formula to find the original amount if I have the
>> percentage (10%) and the amount the bank got ($90.00). I know in my
>> head that the original amount is $100.00, but I have to do it
>> programatically.
>>
>> I know this is probably dead simple, but I just can't get my head around
>> it.
>>
>> Thanks in advance.
>
> If a * b = c then
>
> a = c / b
>
> b = c / a
>
> In your case, 100 * 0.9 = 90
>
> Therefore to get the original,
>
> 90 / 0.9 = 100
>
> 0.9 being the decimal fraction that equates to 90%, ie the amount the
> customer paid after discount.
>
> Observation though, processing fees are usually a % of the amount paid.
>
> eg if a card payment processing service charges 1.25%, that would be
> 1.25% of the payments made, so in your case:
>
> Invoice: = 100.00
> Discount: 10% = 10.00
> Amount due: = 90.00
> ========================
> Processing: 10% = 9.00
> Amount to bank: = 81.00
>
> The payment processing is only concerned with the amount of the
> transaction that it actually processes, not some other intermediate
> calculation between the merchant and the customer.
>
> Consider the case where the customer is given a 95% discount by the
> store. If your processing service still charges 10% of the original
> amount, the your processing fee is more than actual transaction value:
>
> Invoice: = 100.00
> Discount: 10% = 95.00
> Amount due: = 5.00
> ==================================
> Processing: 10% of 100.00 = 10.00
> Amount to bank: = -5.00 ???? Error
>
> The correct math for this case is more likely:
>
> Invoice: = 100.00
> Discount: 10% = 95.00
> Amount due: = 5.00
> ========================
> Processing: 10% = 0.50
> Amount to bank: = 4.50
>
> As a general rule, payment processing systems only concern themselves
> with the amounts that they are handling, and not other amounts that may
> have appeared in calculations made outside of their own systems.
>
> Of course, if you're working on something like a sales commission basis,
> that might be a different set of rules, as you might expect to be
> receiving a commission based on the listed price, regardless of whether
> the items are sold at a discount or not.
>

Actually, Denis, since the original statement was the processor gets
$10, he would get $10/$90 or 11.11% of the sale.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Math Formula Question - Need Ideas [message #184521 is a reply to message #184519] Sun, 05 January 2014 16:40 Go to previous messageGo to next message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma: 0
Senior Member
On Sat, 04 Jan 2014 20:22:31 -0500, Jerry Stuckle wrote:

> On 1/4/2014 7:54 PM, Denis McMahon wrote:
>> On Sun, 05 Jan 2014 00:26:08 +0000, Adrienne Boswell wrote:
>>
>>> I have a math question to which I can't find the answer. Here is the
>>> scenario:
>>>
>>> Someone goes to a store and has $100.00 worth of items. The merchant
>>> gives the customer a 10% discount, so only $90.00 is sent to the bank.
>>> Of the original amount, $10.00 goes to the customer for the discount,
>>> $80.00 goes to the merchant, $10.00 goes for a processing fee. But
>>> those amounts have to be calced on the original amount, not what the
>>> bank got. I need a formula to find the original amount if I have the

> Actually, Denis, since the original statement was the processor gets
> $10, he would get $10/$90 or 11.11% of the sale.

Yeah, I took the statement "those amounts have to be calced on the
original amount" as implying that the processing fee was being calculated
on the pre-discounted total, as was the discount.

Which is what led me to querying the nature of the processing fee, and
whether given it's nature it's being calculated at the right point,
because I would expect that a [payment] processing fee would normally be
related to the amount of the actual transaction, which as you say is
$10 / $90 in this case.

I'm also wondering if Adrienne is perhaps using the term "processing fee"
in a way other than that which I expect it to be used - we do get the
"some people use a slightly different english" problem here occasionally.

eg if "processing" was something like shipping and packing, $10 per
order, then it would be $10 regardless of the original amount or the
discounter amount, but then I wouldn't expect the processing fee to be
calculated from the transaction cost at all, I'd expect it to be mainly a
function of the total volume / weight and possibly item count of the
goods involved.

--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
Re: Math Formula Question - Need Ideas [message #184522 is a reply to message #184514] Sun, 05 January 2014 17:53 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
Adrienne Boswell wrote:

> Someone goes to a store and has $100.00 worth of items. The merchant
> gives the customer a 10% discount, so only $90.00 is sent to the bank.
> Of the original amount, $10.00 goes to the customer for the discount,
> $80.00 goes to the merchant, $10.00 goes for a processing fee. But those
> amounts have to be calced on the original amount, not what the bank got.
> I need a formula to find the original amount if I have the percentage
> (10%) and the amount the bank got ($90.00). I know in my head that the
> original amount is $100.00, but I have to do it programatically.
>
> I know this is probably dead simple, but I just can't get my head around
> it.

Do your own homework.

[You cannot be serious asking a question regarding simple arithmetic
(percentage calculation, for crying out loud) in a newsgroup for a
programming language — without showing any attempt to solve it by
yourself, I should add.]


PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)
Re: Math Formula Question - Need Ideas [message #184523 is a reply to message #184515] Sun, 05 January 2014 17:56 Go to previous messageGo to next message
Allodoxaphobia is currently offline  Allodoxaphobia
Messages: 21
Registered: September 2010
Karma: 0
Junior Member
On Sat, 04 Jan 2014 19:33:31 -0500, Richard Damon wrote:
> On 1/4/14, 7:26 PM, Adrienne Boswell wrote:
>> I have a math question to which I can't find the answer. Here is the
>> scenario:
>>
>> Someone goes to a store and has $100.00 worth of items. The merchant
>> gives the customer a 10% discount, so only $90.00 is sent to the bank.
>> Of the original amount, $10.00 goes to the customer for the discount,
>> $80.00 goes to the merchant, $10.00 goes for a processing fee. But those
>> amounts have to be calced on the original amount, not what the bank got.
>> I need a formula to find the original amount if I have the percentage
>> (10%) and the amount the bank got ($90.00). I know in my head that the
>> original amount is $100.00, but I have to do it programatically.
>>
>> I know this is probably dead simple, but I just can't get my head around
>> it.
>>
>> Thanks in advance.
>>
> 10% is 0.1
>
> You got the $90 by multiplying the original $100 by (1-0.1) to get $90,
> so you can divide the $90 by (1 - 0.1) to get the original $100

Then, state and local taxes are usually calc'd on the original price,
not the discounted price.
Re: Math Formula Question - Need Ideas [message #184524 is a reply to message #184523] Sun, 05 January 2014 18:15 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 1/5/2014 12:56 PM, Allodoxaphobia wrote:
> On Sat, 04 Jan 2014 19:33:31 -0500, Richard Damon wrote:
>> On 1/4/14, 7:26 PM, Adrienne Boswell wrote:
>>> I have a math question to which I can't find the answer. Here is the
>>> scenario:
>>>
>>> Someone goes to a store and has $100.00 worth of items. The merchant
>>> gives the customer a 10% discount, so only $90.00 is sent to the bank.
>>> Of the original amount, $10.00 goes to the customer for the discount,
>>> $80.00 goes to the merchant, $10.00 goes for a processing fee. But those
>>> amounts have to be calced on the original amount, not what the bank got.
>>> I need a formula to find the original amount if I have the percentage
>>> (10%) and the amount the bank got ($90.00). I know in my head that the
>>> original amount is $100.00, but I have to do it programatically.
>>>
>>> I know this is probably dead simple, but I just can't get my head around
>>> it.
>>>
>>> Thanks in advance.
>>>
>> 10% is 0.1
>>
>> You got the $90 by multiplying the original $100 by (1-0.1) to get $90,
>> so you can divide the $90 by (1 - 0.1) to get the original $100
>
> Then, state and local taxes are usually calc'd on the original price,
> not the discounted price.
>

Incorrect. State and local taxes are calculated on the actual
(discounted) selling price.

At least that's so in the United States.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Math Formula Question - Need Ideas [message #184525 is a reply to message #184521] Sun, 05 January 2014 18:16 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 1/5/2014 11:40 AM, Denis McMahon wrote:
> On Sat, 04 Jan 2014 20:22:31 -0500, Jerry Stuckle wrote:
>
>> On 1/4/2014 7:54 PM, Denis McMahon wrote:
>>> On Sun, 05 Jan 2014 00:26:08 +0000, Adrienne Boswell wrote:
>>>
>>>> I have a math question to which I can't find the answer. Here is the
>>>> scenario:
>>>>
>>>> Someone goes to a store and has $100.00 worth of items. The merchant
>>>> gives the customer a 10% discount, so only $90.00 is sent to the bank.
>>>> Of the original amount, $10.00 goes to the customer for the discount,
>>>> $80.00 goes to the merchant, $10.00 goes for a processing fee. But
>>>> those amounts have to be calced on the original amount, not what the
>>>> bank got. I need a formula to find the original amount if I have the
>
>> Actually, Denis, since the original statement was the processor gets
>> $10, he would get $10/$90 or 11.11% of the sale.
>
> Yeah, I took the statement "those amounts have to be calced on the
> original amount" as implying that the processing fee was being calculated
> on the pre-discounted total, as was the discount.
>
> Which is what led me to querying the nature of the processing fee, and
> whether given it's nature it's being calculated at the right point,
> because I would expect that a [payment] processing fee would normally be
> related to the amount of the actual transaction, which as you say is
> $10 / $90 in this case.
>
> I'm also wondering if Adrienne is perhaps using the term "processing fee"
> in a way other than that which I expect it to be used - we do get the
> "some people use a slightly different english" problem here occasionally.
>
> eg if "processing" was something like shipping and packing, $10 per
> order, then it would be $10 regardless of the original amount or the
> discounter amount, but then I wouldn't expect the processing fee to be
> calculated from the transaction cost at all, I'd expect it to be mainly a
> function of the total volume / weight and possibly item count of the
> goods involved.
>

Agreed. The entire question isn't real clear - no wonder the OP is
having problems with it.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Math Formula Question - Need Ideas [message #184526 is a reply to message #184522] Sun, 05 January 2014 22:56 Go to previous messageGo to next message
Adrienne Boswell is currently offline  Adrienne Boswell
Messages: 25
Registered: October 2010
Karma: 0
Junior Member
Thomas 'PointedEars' Lahn <PointedEars(at)web(dot)de> wrote

> Adrienne Boswell wrote:
>
>> Someone goes to a store and has $100.00 worth of items. The merchant
>> gives the customer a 10% discount, so only $90.00 is sent to the
>> bank. Of the original amount, $10.00 goes to the customer for the
>> discount, $80.00 goes to the merchant, $10.00 goes for a processing
>> fee. But those amounts have to be calced on the original amount, not
>> what the bank got. I need a formula to find the original amount if I
>> have the percentage (10%) and the amount the bank got ($90.00). I
>> know in my head that the original amount is $100.00, but I have to do
>> it programatically.
>>
>> I know this is probably dead simple, but I just can't get my head
>> around it.
>
> Do your own homework.
>
> [You cannot be serious asking a question regarding simple arithmetic
> (percentage calculation, for crying out loud) in a newsgroup for a
> programming language — without showing any attempt to solve it by
> yourself, I should add.]
>
>
> PointedEars

Yes, I can be serious asking a question like this. Have you ever looked
at something you spelled correctly, and it doesn't look right?
Sometimes, I think something is harder than it is, and confuse myself.
That's what happened here.


--
Adrienne Boswell
Arbpen Web Site Design Services - http://www.cavalcade-of-coding.info/
The Good Plate - Fresh Gourmet Recipes - http://the-good-plate.com/
Please respond to the group so others can share
Re: Math Formula Question - Need Ideas [message #184527 is a reply to message #184525] Sun, 05 January 2014 23:09 Go to previous messageGo to next message
Adrienne Boswell is currently offline  Adrienne Boswell
Messages: 25
Registered: October 2010
Karma: 0
Junior Member
Jerry Stuckle <jstucklex(at)attglobal(dot)net> wrote

> On 1/5/2014 11:40 AM, Denis McMahon wrote:
>> On Sat, 04 Jan 2014 20:22:31 -0500, Jerry Stuckle wrote:
>>
>>> On 1/4/2014 7:54 PM, Denis McMahon wrote:
>>>> On Sun, 05 Jan 2014 00:26:08 +0000, Adrienne Boswell wrote:
>>>>
>>>> > I have a math question to which I can't find the answer. Here is
>>>> > the scenario:
>>>> >
>>>> > Someone goes to a store and has $100.00 worth of items. The
>>>> > merchant gives the customer a 10% discount, so only $90.00 is sent
>>>> > to the bank. Of the original amount, $10.00 goes to the customer
>>>> > for the discount, $80.00 goes to the merchant, $10.00 goes for a
>>>> > processing fee. But those amounts have to be calced on the
>>>> > original amount, not what the bank got. I need a formula to find
>>>> > the original amount if I have the
>>
>>> Actually, Denis, since the original statement was the processor gets
>>> $10, he would get $10/$90 or 11.11% of the sale.
>>
>> Yeah, I took the statement "those amounts have to be calced on the
>> original amount" as implying that the processing fee was being
>> calculated on the pre-discounted total, as was the discount.
>>
>> Which is what led me to querying the nature of the processing fee,
>> and whether given it's nature it's being calculated at the right
>> point, because I would expect that a [payment] processing fee would
>> normally be related to the amount of the actual transaction, which as
>> you say is $10 / $90 in this case.
>>
>> I'm also wondering if Adrienne is perhaps using the term "processing
>> fee" in a way other than that which I expect it to be used - we do
>> get the "some people use a slightly different english" problem here
>> occasionally.
>>
>> eg if "processing" was something like shipping and packing, $10 per
>> order, then it would be $10 regardless of the original amount or the
>> discounter amount, but then I wouldn't expect the processing fee to
>> be calculated from the transaction cost at all, I'd expect it to be
>> mainly a function of the total volume / weight and possibly item
>> count of the goods involved.
>>
>
> Agreed. The entire question isn't real clear - no wonder the OP is
> having problems with it.
>

I probably should have put processing in quotes, we're using that term
for something that includes membership fees, and other charges.

Sometimes, when you write a word correctly, it looks wrong, so you ask
someone else how to spell it. That's what happened to me here, I didn't
think I was doing it right and got myself all confused. I want to thank
everyone who responded for their help and confirming what I thought. I
feel better now.


--
Adrienne Boswell
Arbpen Web Site Design Services - http://www.cavalcade-of-coding.info/
The Good Plate - Fresh Gourmet Recipes - http://the-good-plate.com/
Please respond to the group so others can share
Re: Math Formula Question - Need Ideas [message #184528 is a reply to message #184526] Sun, 05 January 2014 23:11 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 1/5/2014 5:56 PM, Adrienne Boswell wrote:
> Thomas 'PointedEars' Lahn <PointedEars(at)web(dot)de> wrote
>
>> Adrienne Boswell wrote:
>>
>>> Someone goes to a store and has $100.00 worth of items. The merchant
>>> gives the customer a 10% discount, so only $90.00 is sent to the
>>> bank. Of the original amount, $10.00 goes to the customer for the
>>> discount, $80.00 goes to the merchant, $10.00 goes for a processing
>>> fee. But those amounts have to be calced on the original amount, not
>>> what the bank got. I need a formula to find the original amount if I
>>> have the percentage (10%) and the amount the bank got ($90.00). I
>>> know in my head that the original amount is $100.00, but I have to do
>>> it programatically.
>>>
>>> I know this is probably dead simple, but I just can't get my head
>>> around it.
>>
>> Do your own homework.
>>
>> [You cannot be serious asking a question regarding simple arithmetic
>> (percentage calculation, for crying out loud) in a newsgroup for a
>> programming language — without showing any attempt to solve it by
>> yourself, I should add.]
>>
>>
>> PointedEars
>
> Yes, I can be serious asking a question like this. Have you ever looked
> at something you spelled correctly, and it doesn't look right?
> Sometimes, I think something is harder than it is, and confuse myself.
> That's what happened here.
>
>

Adrienne,

Don't pay any attention to Pointed Head. He's just being his usual
pedantic self.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Math Formula Question - Need Ideas [message #184535 is a reply to message #184526] Mon, 06 January 2014 19:47 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
Adrienne Boswell wrote:

> Thomas 'PointedEars' Lahn <PointedEars(at)web(dot)de> wrote
>> Adrienne Boswell wrote:
>>> Someone goes to a store and has $100.00 worth of items. The merchant
>>> gives the customer a 10% discount, so only $90.00 is sent to the
>>> bank. Of the original amount, $10.00 goes to the customer for the
>>> discount, $80.00 goes to the merchant, $10.00 goes for a processing
>>> fee. But those amounts have to be calced on the original amount, not
>>> what the bank got. I need a formula to find the original amount if I
>>> have the percentage (10%) and the amount the bank got ($90.00). I
>>> know in my head that the original amount is $100.00, but I have to do
>>> it programatically.
>>>
>>> I know this is probably dead simple, but I just can't get my head
>>> around it.
>>
>> Do your own homework.
>>
>> [You cannot be serious asking a question regarding simple arithmetic
>> (percentage calculation, for crying out loud) in a newsgroup for a
>> programming language — without showing any attempt to solve it by
>> yourself, I should add.]
>
> Yes, I can be serious asking a question like this. Have you ever looked
> at something you spelled correctly, and it doesn't look right?
> Sometimes, I think something is harder than it is, and confuse myself.
> That's what happened here.

Sigh. [psf 10.1] You have a problem with basic arithmetic, not PHP. Why
are you asking in a PHP newsgroup (other than to troll here)? *At least*
you should have the decency to ask in a *math* newsgroup (where people will
tell you, iff they do not ignore you, that you learn these things in
highschool – or its national equivalent).

Please read <http://www.catb.org/~esr/faqs/smart-questions.html> before you
post again.


PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Re: Math Formula Question - Need Ideas [message #184540 is a reply to message #184524] Tue, 07 January 2014 14:57 Go to previous message
John Smith is currently offline  John Smith
Messages: 7
Registered: January 2014
Karma: 0
Junior Member
On Sun, 05 Jan 2014 13:15:17 -0500, Jerry Stuckle
<jstucklex(at)attglobal(dot)net> wrote:

>>
>
> Incorrect. State and local taxes are calculated on the actual
> (discounted) selling price.
>
> At least that's so in the United States.

This looks more like tax law than php however I have to admit the
discussion is interesting.

--

John
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: foreach problem part two
Next Topic: json testing suggestions
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 17:14:25 GMT 2024

Total time taken to generate the page: 0.02450 seconds