support double type and be capable with OS X 64-bit. add a OS X demo.