Yen pinned near 40-year low in test of Tokyo's intervention resolve