#!/usr/local/gnu/bin/bash
function frac(){
    readonly mul=100000000
    readonly mullen=${#mul}
    a=$1
    b=$2
    tmp=`printf "%0${mullen}d" $((a*mul/b))`
    ilen=$((tmplen-(mullen-1)))
    flen=$((mullen-1))
    echo ${tmp:0:$ilen}.${tmp: -$flen}
}

read t x
frac $t $x
