0

Hi - I am having an issue and can't seem to get my head around it. I am trying to calculate GBP from EUR - which should be easy but for some reason my returned value is always a few GBP more than it should be, yet I do the same calculation on my calculator or Google and it's right. Can anyone see what I am doing wrong?

I have this:

$rate = 1.20881; //var_dump shows float, tried different combos too
$euro = 74; //var_dump shows float

$gbp = ($euro / $rate);
//should give me 61.21 but it keeps giving me 64.52

I know it must be something really stupid I am missing and most likely simple, any help would be appreciated.

2
Contributors
2
Replies
10
Views
3 Years
Discussion Span
Last Post by droid2014
1

It works fine for me. It gives: 61.217230168513 on web page and 61.217230168512834936838709143703 on caulculator which tallies.

0

Sorry community - forget I ever said anything! Just spotted my mistake - I keep passing 78 not 74! As if I missed this!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.