#include <algorithm>
#include <iostream>
#include <vector>
#include <math.h>
#include <set>
#include <map>
#include <string>
#include <stack>
#include <queue>
#include <iomanip>
#include <numeric>
#include <tuple>
#include <bitset>
#include <complex>
#include <unistd.h>
#include <cassert>
#include <cctype>
#include <random>
#define _USE_MATH_DEFINES
#define _GLIBCXX_DEBUG
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> plglg;
typedef pair<double, ll> pdlg;
typedef tuple<int, int, int> tiii;
typedef tuple<ll, ll, ll> tlglglg;
typedef tuple<double, double, double> tddd;
typedef complex<double> xy_t;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
double pi = 3.141592653589793;
ll mod = 1000000007;
int intmax = 2147483647;
int intmin = -2147483648;
ll llmax = 9223372036854775807;
ll llmin = -9223372036854775807;
int iinf = intmax / 8;
ll inf = llmax / 8;
double eps = 1e-11;

struct edge {
    int to;
    double cost;
};

int V;
vector<edge> G[1000000];
double d[1000000];

void addedge(int st, int ed, double co) {
    edge e;
    e.to = ed;
    e.cost = co;
    G[st].push_back(e);
}

void dijkstra(int s) {
    priority_queue<pdlg, vector<pdlg>, greater<pdlg> > que;
    fill(d, d + V + 10, llmax);
    d[s] = 0;
    que.push(pdlg(0, s));

    while (!que.empty()) {
        pdlg p = que.top();
        que.pop();
        ll v = p.second;
        if (d[v] < p.first) {
            continue;
        }
        int len = G[v].size();
        for (int i = 0; i < len; i++) {
            edge e = G[v][i];
            if (d[e.to] > d[v] + e.cost) {
                d[e.to] = d[v] + e.cost;
                que.push(pdlg(d[e.to], e.to));
            }
        }
    }
}

int main() {
    cout << fixed;
    cout << setprecision(7);
    while (1) {
        int n, m;
        cin >> n >> m;
        if (n == 0) {
            break;
        }
        V = n * 30 * n + 1;
        for (int i = 0; i < V; i++) {
            G[i].clear();
        }
        int st, ed;
        cin >> st >> ed;
        for (int i = 0; i < m; i++) {
            int x, y, c;
            double d;
            cin >> x >> y >> d >> c;
            for (int j = 0; j < 30; j++) {
                for (int k = 0; k < n; k++) {
                    if (k != y - 1 && k != x - 1) {
                        if (j < c) {
                            addedge(k * 30 * n + j * n + (x - 1),
                                    (x - 1) * 30 * n + j * n + (y - 1),
                                    d / (j + 1) * 1.0);
                        }
                        if (j + 1 < c) {
                            addedge(k * 30 * n + j * n + (x - 1),
                                    (x - 1) * 30 * n + (j + 1) * n + (y - 1),
                                    d / (j + 2) * 1.0);
                        }
                        if (j - 1 >= 0 && j - 1 < c) {
                            addedge(k * 30 * n + j * n + (x - 1),
                                    (x - 1) * 30 * n + (j - 1) * n + (y - 1),
                                    d / j * 1.0);
                        }
                    }
                }
            }
            if (x == st) {
                addedge(V - 1, (x - 1) * 30 * n + 0 * n + (y - 1), d);
            }
            for (int j = 0; j < 30; j++) {
                for (int k = 0; k < n; k++) {
                    if (k != y - 1 && k != x - 1) {
                        if (j < c) {
                            addedge(k * 30 * n + j * n + (y - 1),
                                    (y - 1) * 30 * n + j * n + (x - 1),
                                    d / (j + 1) * 1.0);
                        }
                        if (j + 1 < c) {
                            addedge(k * 30 * n + j * n + (y - 1),
                                    (y - 1) * 30 * n + (j + 1) * n + (x - 1),
                                    d / (j + 2) * 1.0);
                        }
                        if (j - 1 >= 0 && j - 1 < c) {
                            addedge(k * 30 * n + j * n + (y - 1),
                                    (y - 1) * 30 * n + (j - 1) * n + (x - 1),
                                    d / j * 1.0);
                        }
                    }
                }
            }
            if (y == st) {
                addedge(V - 1, (y - 1) * 30 * n + 0 * n + (x - 1), d);
            }
        }
        dijkstra(V - 1);
        // for (int i = 0; i < n; i++) {
        //     for (int j = 0; j < n * 30; j++) {
        //         if (d[i * n * 30 + j] != llmax) {
        //             cout << d[i * n * 30 + j] << " ";
        //         }
        //     }
        //     cout << "aaa" << i << endl;
        // }
        // cout << d[V - 1] << endl;
        double ans = llmax;
        for (int i = 0; i < n; i++) {
            if (d[i * 30 * n + 0 * n + (ed - 1)] < ans) {
                ans = d[i * 30 * n + 0 * n + (ed - 1)];
            }
        }
        if (ans < llmax) {
            cout << ans << endl;
        } else {
            cout << "unreachable" << endl;
        }
    }
}



Measured memory_bytes: 82608