Back to General discussions forum
''' import math l=int(input()) for n in range(l): A,B,C,D=list(map(float,input().split())) start=0 end=100 while(start<=end): mid=int((start+end)/2) x=mid f=Ax + Bmath.sqrt(x3) - Cmath.exp(-x/50) -D if (f==0): x=mid break if(f<0): start=mid+1 x=mid else: end=mid-1 i=0.1 for j in range(7): while(f<=0): x=x+i f=Ax + B*math.sqrt(x3) - C*math.exp(-x/50) -D x=x-i i=i/10 print(x," ")'''
^ this is my code
I am getting an answer nu without the said precision. Can anyone point out what i am doing wrong?
print('%.7f' % x, ' ')