#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <algorithm>
using namespace std;
#define inf (0x3f3f3f3f)
typedef long long int LL;
#include <iostream>
#include <sstream>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <string>
#define eps 1e-7
double a,b,c,d,L,R;
double f (double x)
{
return fabs(a*x*x*x+b*x*x+c*x+d);
}
int same(double a,double b)
{
return fabs(a-b)<eps;
}
void work ()
{
double fL = fabs(f(L));
double fR = fabs(f(R));
if (!same(a,0))
{
double diaota = 4*b*b-12*a*c;
if (diaota<0)
{
printf ("%0.2f\n",max(fL,fR));
}
else
{
double x1 = (-2*b-sqrt(diaota))/(6*a);
double x2 = (-2*b+sqrt(diaota))/(6*a);
// double f1 = fabs(f(x1));
// double f2 = fabs(f(x2));
// double t=max(f1,f2);
// double t2=max(fL,fR);
// double ans = max(t,t2);
// printf ("%0.2f\n",ans);
double f1;
double f2;
int flag1=0;
int flag2=0;
if (x1>=L && x1<=R)
{
flag1=1;
f1=fabs(f(x1));
}
if(x2>=L&&x2<=R)
{
flag2=1;
f2=fabs(f(x2));
}
double ans=max(fL,fR);
if (flag1) ans=max(ans,f1);
if (flag2) ans=max(ans,f2);
printf ("%0.2f\n",ans);
}
}
else if (!same(b,0))
{
double x1 = c/(-2*b);
double ans=max(fL,fR);
if (x1>=L&&x1<=R)
{
ans=max(ans,f(x1));
}
printf ("%0.2f\n",ans);
}
else if (!same(c,0))
{
double ans=max(fL,fR);
printf ("%0.2f\n",ans);
}
else
{
printf ("%0.2f\n",d);
}
}
int main()
{
#ifdef local
freopen("data.txt","r",stdin);
#endif
while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&L,&R)!=EOF) work();
return 0;
}