#include <iostream>
#include <algorithm>
#include <queue>
#include <map>
#include <cstdio>
#include <cmath>

using namespace std;

typedef pair<int, int> P;

const int INF = 100000000;
const double EPS = 1e-8;

class State{
public:
  int pos, v, pre;
  double time;
  State(){}
  State(int pos, int v, int pre, double time) : pos(pos), v(v), pre(pre), time(time) {}
  bool operator < (const State& s) const { return time > s.time; }
};

int n, m, s, g;
P edge[30][30];
double cost[30][30][31];
bool vis[30][30][31];

bool equals(double a, double b){
  return fabs(a-b) < EPS;
}

void solve(){
  State u, v;
  u = State(s, 0, 0, 0.0);
  priority_queue<State> que;
  fill(vis[0][0], vis[30][0], (double)INF);
  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++){
      for(int k=0;k<31;k++){
        cost[i][j][k] = INF;
        vis[i][j][k] = false;
      }
    }
  }
  cost[0][0][1] = 0.0;
  for(int i=0;i<n;i++){
    if(edge[s][i].first != INF){
      cost[s][i][1] = edge[s][i].first;
      que.push(State(i, 1, s, (double)edge[s][i].first));
    }
  }
  while(!que.empty()){
    u = que.top(); que.pop();
    //cout << u.pos << ' ' << u.v << ' ' << u.pre << ' ' << u.time << endl;
    if(vis[u.pre][u.pos][u.v]) continue;
    vis[u.pre][u.pos][u.v] = true;
    if(u.pos == g && u.v == 1){
      printf("%.5f\n", u.time);
      return;
    }
    for(int i=0;i<n;i++){
      if(edge[u.pos][i].first == INF) continue;
      if(u.pre == i) continue;
      for(int k=-1;k<=1;k++){
        if(u.v + k > edge[u.pos][i].second) continue;
        if(u.v + k <= 0) continue;
        v = State(i, u.v + k, u.pos, u.time + edge[u.pos][i].first / (double)(u.v + k));
        //cout << '\t' << v.pos << ' ' << v.v << ' ' << v.pre << ' ' << v.time << ' ' << vis[v.pre][v.pos][v.v] << endl;
        if(cost[v.pre][v.pos][v.v] > v.time){
          cost[v.pre][v.pos][v.v] = v.time;
          que.push(v);
        }
      }
    }
  }
  printf("unreachable\n");
}

int main(){
  while(scanf("%d%d", &n, &m) && (n|m)){
    scanf("%d%d", &s, &g);
    s--; g--;
    fill(edge[0], edge[30], P(INF, 0));
    for(int i=0;i<m;i++){
      int a, b, c, d;
      scanf("%d%d%d%d", &a, &b, &c, &d);
      a--; b--;
      edge[a][b] = edge[b][a] = P(c, d);
    }
    solve();
  }
}