Find Jobs
Hire Freelancers

Necesito un programador que convierta mi codigo en C a lenguaje FORTRAN. Ya lo tengo avanzado|

$10-30 USD

Closed
Posted about 2 years ago

$10-30 USD

Paid on delivery
En la universidad me han pedido que convierta un código en C a lenguaje fortran. Tengo un poco avanzado, el codigo no es extenso, aqui lo comparto (este esta en C): #include <stdlib.h> #include <stdio.h> #include <math.h> #define EPS 0.001 #define NMAX 20 #define H 0.001 #define SIGMA 20 #define EPSILON 0.001 #define GAS 20 #define RMENOS 0.001 #define RMAS 20 #define NAME 0.001 float sum_par (int n, float mu){//Calcula las sumas parciales int i,j,k; float aux,sum=0; for(i=-n;i<=n;i++) for(j=-n;j<=n;j++) for(k=-n;k<=n;k++){ aux=(float)i*i+j*j+k*k+i*j+i*k+j*k; if(aux) sum+=pow((float)aux,-0.5*mu); } return sum; } float suma(float mu){ int n=1; float sum,aux,eps=[login to view URL]; aux=sum_par(1,mu); while(eps>EPS){ n++; if(n==NMAX){ printf("Demasiadas iteracciones en la funcion suma \n"); exit(1); } sum=sum_par(n,mu); eps=fabs(sum-aux); aux=sum; } return sum; } float u(float e, float s, float a_6, float a_12, float r){ float aux6, aux12; if(abs(r)<1.e-3){ printf("Seleccione un valor mayor para %f\n" ,r); exit(1); } aux6=pow(s/r,6.); aux12=aux6*aux6; return (2.*e*(a_12*aux12-a_6*aux6)); } float min (float e, float s, float a_6, float a_12, float a, float b){ float r1,r2,eps; int n=0; eps=b-a; r1=a+eps/3; r2=a+2.*eps/3.; while(eps>EPS){ n++; if(n==NMAX){ printf("Demasiadas iteraciones en la funcion min \n"); exit(1); } if(u(e,s,a_6,a_12,r1)>u(e,s,a_6,a_12,r2)) a=r1; else b=r2; eps = b-a; r1=a+eps/3.; r2=a+2.*eps/3.; } return (a+eps/2.); } void main (void){ float a_6, a_12, s=SIGMA, e=EPSILON, rmin, u_c, b_0,d2; FILE *out; out=fopen(NAME,"w"); a_6=suma(6.); a_12=suma(12.); rmin=min(e,s,a_6,a_12,RMENOS,RMAS); u_c=u(e,s,a_6,a_12,rmin); d2=u(e,s,a_6,a_12,rmin+H)+u(e,s,a_6,a_12,rmin-H)-2.*u_c; d2/=H*H; b_0=sqrt(2.)*d2/(9.*rmin); fprintf(out,"Gas noble ..............................%s\n", GAS); fprintf(out,"Separacion equilibrio...................%4.3f Amstrongs\n",rmin); fprintf(out,"Energia de cohesion por atomo...........%5.4f eV\n",u_c); fprintf(out,"Modulo de comprension..................."); fprintf(out,"%5.4f 10%c(10) din/cm%c2\n\n",160*b_0,94,94); fclose(out); }
Project ID: 33453014

About the project

1 proposal
Remote project
Active 2 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
1 freelancer is bidding on average $20 USD for this job
User Avatar
Hi! Nice to see your article! I've carefully seen and analyzed your requirement. I really interested in your task. I received a degree the master of information science and had experience and skill to satisfy you. I’m going to devote all my passion in your task and receive the smallest price. I hope we will meet again soon. C U again! Thanks.
$20 USD in 1 day
4.9 (7 reviews)
3.4
3.4

About the client

Flag of PERU
Chiclayo, Peru
0.0
0
Payment method verified
Member since Jun 28, 2021

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.