#include <iostream>
#include <iomanip>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <numeric>
#include <iterator>

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int,int> PII;
typedef istringstream ISS;
typedef ostringstream OSS;

#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )
#define FOR( v, c ) for ( auto &v : c )

#define EACH( it, c ) for ( auto it = c.begin(); it != c.end(); ++it )
#define ALL( c ) (c).begin(), (c).end()
#define DRANGE( c, p ) (c).begin(), (c).begin() + p, (c).end()

#define PB( n ) push_back( n )
#define MP( a, b ) make_pair( ( a ), ( b ) )
#define EXIST( c, e ) ( (c).find( e ) != (c).end() )

#define fst first
#define snd second

#define DUMP( x ) cerr << #x << " = " << ( x ) << endl
#define DEBUG( x ) cerr << __FILE__ << ":" << __LINE__ << ": " << #x << " = " << ( x ) << endl

struct Edge
{
	int to, dist, limit;
	Edge( int t, int d, int l ) : to( t ), dist( d ), limit( l )
	{
	}
};

struct State
{
	int node, prev, speed;
	State( int n, int p, int s ) : node( n ), prev( p ), speed( s )
	{
	}

	bool operator < ( const State &a ) const
	{
		return true;
	}
};

typedef vector<double> VD;
typedef vector<VD> VVD;
typedef vector<VVD> VVVD;

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

	cout << setprecision( 4 ) << fixed;

	while ( true )
	{
		int n, m;
		cin >> n >> m;

		if ( !( n | m ) )
		{
			break;
		}

		int s, g;
		cin >> s >> g;
		s--;
		g--;

		vector< vector<Edge> > G( n );
		REP( i, 0, m )
		{
			int x, y, d, c;
			cin >> x >> y >> d >> c;
			x--;
			y--;

			G[x].PB( Edge( y, d, c ) );
			G[y].PB( Edge( x, d, c ) );
		}

		VVVD distance( n, VVD( n, VD( 31, DBL_MAX ) ) );
		distance[s][s][0] = 0;

		priority_queue< pair<double,State>, vector< pair<double,State> >, greater< pair<double,State> > > que;
		que.push( MP( 0, State( s, s, 0 ) ) );

		while ( !que.empty() )
		{
			int dist = que.top().fst;
			State cur = que.top().snd;
			que.pop();

			if ( distance[ cur.node ][ cur.prev ][ cur.speed ] < dist )
			{
				continue;
			}

			REP( i, 0, G[ cur.node ].size() )
			{
				const Edge &e = G[ cur.node ][i];
				if ( e.to == cur.prev )
				{
					continue;
				}

				REP( ds, -1, 2 )
				{
					int nspeed = cur.speed + ds;
					if ( nspeed <= 0 || e.limit < nspeed )
					{
						continue;
					}

					if ( distance[ cur.node ][ cur.prev ][ cur.speed ] + 1. * e.dist / nspeed < distance[ e.to ][ cur.node ][ nspeed ] )
					{
						distance[ e.to ][ cur.node ][ nspeed ] = distance[ cur.node ][ cur.prev ][ cur.speed ] + 1. * e.dist / nspeed;
						que.push( MP( distance[ e.to ][ cur.node ][ nspeed ], State( e.to, cur.node, nspeed ) ) );
					}
				}
			}
		}

		double res = DBL_MAX;
		REP( i, 0, n )
		{
			res = min( res, distance[g][i][1] );
		}

		if ( res == DBL_MAX )
		{
			cout << "unreachable";
		}
		else
		{
			cout << res;
		}
		cout << endl;
	}

	return 0;
}

Measured memory_bytes: 2136