native double impl