//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
#include <queue>

using namespace std;

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef pair<double,int> PDI;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);
const double INF = 1e9;

struct Edge{
  int to;
  double cost;

  Edge(int t, double c): to(t), cost(c)
  {}
  bool operator>(const Edge& rhs) const{
	return cost > rhs.cost;
  }
};
typedef vector< vector<Edge> > Graph;
void add_edge(Graph& G, int x, int y, double c){
  G[x].PB(Edge(y,c));
  G[y].PB(Edge(x,c));
}

void Dijkstra(const Graph& edges, vector<double>& d, int s){
  const int V = edges.size();
  priority_queue<PDI, vector<PDI>, greater<PDI> > pq;
  fill(d.begin(), d.end(), INF);
  d[s] = 0.;
  pq.push(MP(0.,s));

  while(!pq.empty()){
	PDI pii = pq.top(); pq.pop();
	int v = pii.second;
	if(d[v] < pii.first) continue;
	for(int i=0;i<edges[v].size();++i){
	  const Edge& e = edges[v][i];
	  if(d[e.to] > d[v] + e.cost){
		d[e.to] = d[v] + e.cost;
		pq.push(MP(d[e.to], e.to));
	  }
	}
  }
}


int N, M;
int idx(int node, int sp, int prv){
  return (node * 50 + prv) * 50 + sp;
}

int main(){
  cin.tie(0);
  ios_base::sync_with_stdio(false);

  int N, M;
  while(cin>>N>>M,N){
	int S, Gl; cin >> S >> Gl;
	--S, --Gl;

	Graph G(50*50*50);
	REP(i,M){
	  int x, y, d, c; cin >> x >> y >> d >> c;
	  --x, --y;
	  for(int j=1;j<=c;++j){
		double cost = d * 1. / j;
		REP(prv,N){
		  if(prv != y)
			G[idx(x,j,prv)].PB(Edge(idx(y,j,x), cost));
		  if(prv != x)
			G[idx(y,j,prv)].PB(Edge(idx(x,j,y), cost));
		}
	  }
	  for(int j=c+1;j>1;--j){
		double cost = d*1./(j-1);
		REP(prv,N){
		  if(prv != y)
			G[idx(x,j,prv)].PB(Edge(idx(y,j-1,x), cost));
		  if(prv != x)
			G[idx(y,j,prv)].PB(Edge(idx(x,j-1,y), cost));
		  }
	  }
	  for(int j=1;j<c;++j){
		double cost = d*1./(j+1);
		REP(prv,N){
		  if((x == S || y == S) && prv == S) continue;
		  if(prv != y){
			G[idx(x,j,prv)].PB(Edge(idx(y,j+1,x), cost));
		  }
		  if(prv != x)
			G[idx(y,j,prv)].PB(Edge(idx(x,j+1,y), cost));
		}
	  }
	}

	vector<double> dist(50*50*50, INF);
	Dijkstra(G, dist, idx(S,1,S));
	double ans = INF;
	REP(prv,N) ans = min(ans, dist[idx(Gl,1,prv)]);
	
	if(ans >= INF) cout << "unreachable" << endl;
	else cout << fixed << setprecision(9) << ans << endl;
  }

  return 0;
}

Measured memory_bytes: 62416