Currency converter in Calculator

Asked by S Stevens

Hello

I am using Ubuntu 10 and part of it is the Calculator - gcalctool 5.32.0 !
I want to know how is the conversion currency value calculated when using the Currency Conversion option of that Calculator / in Financial mode / ?
For example I want to convert EUR to GBP and I get : 10eu = £8.32 ?
How is the rate calculated and how is updated ?

 / If I go to the oanda website for example / oanda.com / I get £8.31 ? But on xe.com is again £8.32 ?
Well I want to know the mechanism behind calculating these rates, where from is the information downloaded , how is downloaded and how is updated ? The reason is that I want to use the calculator for business and want to know how accurate is or would be gcalctool 5.32.0 ?/

Thank you very much for you help and explanation.

Regards :Daniel

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gcalctool Edit question
Assignee:
No assignee Edit question
Solved by:
S Stevens
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

There are rounding errors in things like this so you will get minor discrepancies like that, the rate may also slightly change resulting in a different result. Depends how often the rate is sampled for the site.

You could submit this sort of thing as an idea on:

http://brainstorm.ubuntu.com

Revision history for this message
S Stevens (sstevens-deactivatedaccount) said :
#2

Well I still need to know how is the info updated and where from ?

Revision history for this message
S Stevens (sstevens-deactivatedaccount) said :
#3

What website we're talking about ?

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#4

Gcalctool uses currency conversion rates obtained from the European Central Bank (http://www.ecb.europa.eu) website. Specifically, it uses http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml. Although the ECB updates that file daily on their web server, Gcalctool only updates it to make sure it's no more than a week old. It checks the age of the local copy, when you ask it to perform a currency conversion.

I am not sure if this behavior is actually documented anywhere, but fortunately the source code itself well-documented. For example, in Maverick:
http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/maverick/gcalctool/maverick/annotate/head:/src/currency.c
(Search for the comment, "A file needs to be redownloaded if it doesn't exist, or every 7 days.")

In the upstream sources, the implementation is a little different, but it achieves the same thing:
http://git.gnome.org/browse/gcalctool/tree/src/currency.c
(Search for the comment "Update rates if necessary" and notice that 60 * 60 * 24 * 7 is the number of seconds in a week.)

Notice that in the upstream sources, it gets currency conversion information from the International Monetary Fund as well as the European Central Bank. However, that behavior is not (or not yet) in Ubuntu Maverick's version of gcalctool.

Revision history for this message
Sam_ (and-sam) said :
#5

> calculator for business

Gnome says...
http://library.gnome.org/users/gcalctool/5.32/conv-currency.html.en
## Also available via help button
http://library.gnome.org/users/gcalctool/5.32/

Contact and bug list.
http://live.gnome.org/Gcalctool

Qalculate allows to update currency rates
http://qalculate.sourceforge.net/
from there.
http://www.ecb.europa.eu/stats/exchange/eurofxref/html/index.en.html

Manual says:
Wget or gnome-vfs must be installed on the computer for exchange rate updates to be enabled. Current exchange rates are automatically fetched from the European Central Bank on the Internet, the first time Qalculate! is started. By default the exchange rates will thereafter have to be updated manually from File ▸ Update Exchange Rates, unless automatic updates are enabled in the preferences dialog.

At the moment Qalculate says: 10€ is 8,3155£

It even now has Indian Rupees.
http://sourceforge.net/projects/qalculate/forums/forum/296943/topic/1718001?message=4268400

Helpful source.
http://sourceforge.net/projects/qalculate/forums

Revision history for this message
S Stevens (sstevens-deactivatedaccount) said :
#6

That answers all my questions guys ! Thanks .