File:Roublellip.png: Difference between revisions
imported>Dmitrii Kouznetsov ({{Image_Details|user |description = Approximation of the experimental data of price of the Russian rouble, measured in the USA cent |author = ~~~ |date-created = 2014.12.11 |pub-country = Japan |notes = Copied from TORI, http://mizu...) |
imported>Dmitrii Kouznetsov No edit summary |
||
Line 10: | Line 10: | ||
== Licensing == | == Licensing == | ||
{{CC|by|3.0}} | {{CC|by|3.0}} | ||
==References== | |||
https://www.mataf.net/en/currency/converter-RUB-USD RUSSIAN RUBLE TO US DOLLAR CONVERTER (EXCHANGE RATE 1 RUB = 0.0199 USD), 2014.11.29 | |||
==[[C++]] generator of curves== | |||
#include<math.h> | |||
#include<stdio.h> | |||
#include<stdlib.h> | |||
#define DB double | |||
#define DO(x,y) for(x=0;x<y;x++) | |||
#include"ado.cin" | |||
FILE *i,*o; | |||
int main(){ int j,n,m,N=200; | |||
char d[N][16]; | |||
DB f[N]; | |||
int di; | |||
DB dr; | |||
int day; | |||
i=fopen("dollardata.txt","r"); | |||
fscanf(i,"%d",&day); | |||
DO(n,N) | |||
{ j=fscanf(i,"%s%d%lf",d[n],&di,&dr); | |||
if(j<3) goto end; | |||
f[n]=di+.001*dr; | |||
printf("%1d %3d %s %2d %8.3lf %4d %6.4lf %6.4lf\n",j,n,d[n],di,dr,day-n,f[n],1000./f[n]); | |||
} | |||
end: N=n; fclose(i); | |||
o=fopen("10.eps","w"); | |||
ado(o,720,320); | |||
#define M(x,y) fprintf(o,"%6.4f %6.4f M\n",0.+x,0.+y); | |||
#define L(x,y) fprintf(o,"%6.4f %6.4f L\n",0.+x,0.+y); | |||
fprintf(o,"210 10 translate 10 10 scale\n"); | |||
for(n=0;n<31;n+=10) {M(-20,n)L(50,n)} | |||
for(n=-20;n<51;n+=10) {M(n,0)L(n,30)} | |||
fprintf(o,"0 0 0 RGB 2 setlinecap .1 W S\n"); | |||
DB x,y; | |||
DO(n,N){x=(day-n)/10.; y=1000./f[n]; if(n==0) M(x,y) else L(x,y) } | |||
fprintf(o,"0 1 0 RGB 1 setlinejoin 1 setlinecap 1 W S\n"); | |||
M(-12,30) L(50,0) fprintf(o,"0 0 0 RGB .2 W S\n"); | |||
DB z; | |||
for(n=0;n<800;n++) | |||
{x=.1*n-20.4; z=x+14.; | |||
z/=23.6; | |||
z*=z; | |||
z= 1. - z; | |||
if(z<0) break; z=sqrt(z); | |||
z=z*2.94; | |||
y=10*z; | |||
if(n==0) M(x,y) else L(x,y) | |||
} | |||
fprintf(o,"1 0 0 RGB .1 W S\n"); | |||
fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o); | |||
system("epstopdf 10.eps"); | |||
system( "open 10.pdf"); | |||
printf("day of observaiton: %3d\n", day); | |||
} |
Revision as of 09:25, 19 December 2014
Summary
Title / Description
|
Approximation of the experimental data of price of the Russian rouble, measured in the USA cent |
---|---|
Citizendium author & Copyright holder
|
Copyright © Dmitrii Kouznetsov (talk). See below for licence/re-use information. |
Date created
|
2014.12.11 |
Country of first publication
|
Japan |
Notes
|
Copied from TORI, http://mizugadro.mydns.jp/t/index.php/File:Roublellip.png |
Other versions
|
http://mizugadro.mydns.jp/t/index.php/File:Roublellip.png |
Using this image on CZ
|
| , then copy the code below to add this image to a Citizendium article, changing the size, alignment, and caption as necessary.
Please send email to manager A T citizendium.org .
Licensing
This media, Roublellip.png, is licenced under the Creative Commons Attribution 3.0 Unported License
You are free:
To Share — To copy, distribute and transmit the work; To Remix — To adapt the work.
Under the following conditions:
Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
For any reuse or distribution, you must make clear to others the licence terms of this work (the best way to do this is with a link to this licence's web page). Any of the above conditions can be waived if you get permission from the copyright holder. Nothing in this licence impairs or restricts the author's moral rights.
Read the full licence.
References
https://www.mataf.net/en/currency/converter-RUB-USD RUSSIAN RUBLE TO US DOLLAR CONVERTER (EXCHANGE RATE 1 RUB = 0.0199 USD), 2014.11.29
C++ generator of curves
#include<math.h> #include<stdio.h> #include<stdlib.h> #define DB double #define DO(x,y) for(x=0;x<y;x++) #include"ado.cin" FILE *i,*o; int main(){ int j,n,m,N=200; char d[N][16]; DB f[N]; int di; DB dr; int day; i=fopen("dollardata.txt","r"); fscanf(i,"%d",&day); DO(n,N) { j=fscanf(i,"%s%d%lf",d[n],&di,&dr); if(j<3) goto end; f[n]=di+.001*dr; printf("%1d %3d %s %2d %8.3lf %4d %6.4lf %6.4lf\n",j,n,d[n],di,dr,day-n,f[n],1000./f[n]); } end: N=n; fclose(i);
o=fopen("10.eps","w"); ado(o,720,320); #define M(x,y) fprintf(o,"%6.4f %6.4f M\n",0.+x,0.+y); #define L(x,y) fprintf(o,"%6.4f %6.4f L\n",0.+x,0.+y); fprintf(o,"210 10 translate 10 10 scale\n"); for(n=0;n<31;n+=10) {M(-20,n)L(50,n)} for(n=-20;n<51;n+=10) {M(n,0)L(n,30)} fprintf(o,"0 0 0 RGB 2 setlinecap .1 W S\n"); DB x,y; DO(n,N){x=(day-n)/10.; y=1000./f[n]; if(n==0) M(x,y) else L(x,y) } fprintf(o,"0 1 0 RGB 1 setlinejoin 1 setlinecap 1 W S\n");
M(-12,30) L(50,0) fprintf(o,"0 0 0 RGB .2 W S\n");
DB z; for(n=0;n<800;n++) {x=.1*n-20.4; z=x+14.; z/=23.6; z*=z; z= 1. - z; if(z<0) break; z=sqrt(z); z=z*2.94; y=10*z; if(n==0) M(x,y) else L(x,y) } fprintf(o,"1 0 0 RGB .1 W S\n");
fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o); system("epstopdf 10.eps"); system( "open 10.pdf"); printf("day of observaiton: %3d\n", day); }
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 19:58, 11 March 2022 | 1,519 × 689 (141 KB) | Maintenance script (talk | contribs) | == Summary == Importing file |
You cannot overwrite this file.
File usage
There are no pages that use this file.