// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #include "textflag.h" // func Expm1(x float64) float64 TEXT ·Expm1(SB),NOSPLIT,$0 FLDLN2 // F0=log(2) = 1/log2(e) ~ 0.693147 FMOVD x+0(FP), F0 // F0=x, F1=1/log2(e) FABS // F0=|x|, F1=1/log2(e) FUCOMPP F0, F1 // compare F0 to F1 FSTSW AX SAHF JCC use_exp // jump if F0 >= F1 FLDL2E // F0=log2(e) FMULD x+0(FP), F0 // F0=x*log2(e) (-1