#include<bits/stdc++.h>
using namespace std;
//ダイクストラを空で書きたいあなたに
//離散的速度を例にとって...
const int MAX_C = 32;
const double INF = 1e9;

//頂点
struct node{

    int cur;
    int pre;
    int v;
    double t;

    node(int c, int p, int v, double t) : cur(c), pre(p), v(v), t(t){}
};

//比較演算子
bool operator < (const node &a, const node &b) { return a.t > b.t; }
bool operator > (const node &a, const node &b) { return a.t < b.t; }

struct edge{
    int to;
    double d;
    int c;
    edge(int t, double d, int c) : to(t), d(d), c(c){}
};

int main(){

    while(true){
        int n, m; cin >> n >> m;
        if(!n) break;
        int s, g; cin >> s >> g;
        vector<vector<edge> > adj(n + 1);
        
        for(int i = 0; i < m; i++){
            int x, y, c;
            double d;
            cin >> x >> y >> d >> c;
            adj[x].push_back(edge(y, d, c));
            adj[y].push_back(edge(x, d, c));
        }

        //cur, pre, v
        vector<vector<vector<double> > > result(n + 1, vector<vector<double> > (n + 1, vector<double> (MAX_C, INF)));
        priority_queue<node> pq;

        //スタート地点を追加
        //架空のスタート地点(s, 0, 0)
        result[s][0][0] = 0.0;
        pq.push(node(s, 0, 0, 0.0));

        while(!pq.empty()){

            node now = pq.top();
            pq.pop();
            
            if(result[now.cur][now.pre][now.v] > now.t) continue;

            //今いる頂点と隣接しているすべての頂点をなめる
            for(auto e : adj[now.cur]){
                for(int p = -1; p <= 1; p++){

                    if(now.v + p <= 0) continue;
                    if(e.to == now.pre) continue;
                    node next(e.to, now.cur, now.v + p, now.t + e.d / (double)(now.v + p));
                    if(next.v < 1 || e.c < next.v) continue;
                    
                    //現時点よりも安く到達できそうなら
                    if(result[next.cur][next.pre][next.v] > next.t){
                        result[next.cur][next.pre][next.v] = next.t;
                        pq.push(next);
                    }
                }
            }
        }

        double ans = INF;
        for(int i = 1; i <= n; i++) ans = min(ans, result[g][i][1]);
        if(abs(ans - INF) < 1e-9) printf("unreachable\n"); 
        else printf("%.10lf\n", ans);
    }

    return 0;
}
