?
Solved

Get cost per mile

Posted on 2014-04-21
15
Medium Priority
?
269 Views
Last Modified: 2014-04-25
Is there a way to get cost per mile only using multiplication any numbers are good positive or neg

example:

Total Revenue= $100
Total Miles = 100
Cost per Mile = $1
0
Comment
Question by:Blueice13085
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
  • 3
  • +2
15 Comments
 
LVL 5

Expert Comment

by:Pasha Kravtsov
ID: 40013489
Not sure what you're asking..
I'm assuming you're wondering
let x represent total miles
let y represent cost per mile
x * y = total cost
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40013501
Does exponentiation count as multiplication? If so:

cpm = tRev * (tMiles ^ -1)

Open in new window

0
 

Author Comment

by:Blueice13085
ID: 40013521
Pasha Kravtsov to use your way it would look like this

let X represent total miles
let Y represent cost per mile
let R represent total revenue
let N represent (your choice of ANY number)


X*R*N=Y
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Blueice13085
ID: 40013525
whats ^ represent?
0
 
LVL 17
ID: 40013529
You could multiply the total cost by the inverse of the number of miles. It isn't quite division but it has a similar result.
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40013530
"Raised to the power."
0
 

Author Comment

by:Blueice13085
ID: 40013557
Elaine and Kaufmed can you give me some examples so i can see what you are talking about thanks
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40013568
Elaine is mentioning exactly what I am talking about. I am simply showing it in mathematical terms.

All I am saying is that you raise the total miles to the -1 power--this creates the inverse that Elaine mentioned. Then the remaining operation is multiplication.

I'm not sure how much more of an "example" I can provide. I suppose I can plug in the numbers that you show:

cpm = tRev * (tMiles ^ -1)

1.00 = 100.00 * (100 ^ -1)

Open in new window

0
 
LVL 17
ID: 40013676
Kaufmed, thanks for explaining. I am viewing this in mobile interface and sorry, but I hadn't opened your code snippet so I may have repeated your answer.
0
 

Author Comment

by:Blueice13085
ID: 40013813
what i mean is i dont have a way of using ^ -1 so how can i replace the ^ would this just be like this

1.00 = 100 *( 100*100*-1)
0
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 40013905
No points - yes

Is this for a website?  Which language are you using?  Javascript, php, vb, vbscript, something else?
0
 
LVL 17
ID: 40014195
Some languages use double star (**) to raise to a power.
0
 

Author Comment

by:Blueice13085
ID: 40014307
here is some screen shots i made. The X is the same as *

i can only use #'s no Signs like *,^,etc...

calculation 1calculation 2
0
 
LVL 17
ID: 40014389
If that is the tool you have to work with I think you could only do it by manually calculating the inverse of the distance and inputting the result.
So for instance
Total cost= 120
Miles=50

Inverse miles = 1/50 (1 divided by 50) = 0.02

So input 120 x 0.02 to get 2.4 per mile.
0
 
LVL 17

Accepted Solution

by:
Thibault St john Cholmondeley-ffeatherstonehaugh the 2nd earned 2000 total points
ID: 40014391
But beware because that looks like you are calculating total cost by adding different expenses. Surely you should be inputting cost per mile and the number of miles to let it calculate the total cost for you?
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question