Skip to main content
3 of 8
Added a function variation.
Somos
  • 5.3k
  • 1
  • 10
  • 17

The simplest methods are usually the best. Try this code

N[Cos[x] - Exp[-x 27/10] /. x -> 17*^-26, 15] // InputForm 

or a minor variation

With[{x = 17*^-26}, N[Cos[x] - Exp[-x 27/10], 15]] // InputForm 

or define a function first

f = Cos[#] - Exp[-# 27/10] &; N[f[17*^-26], 15] // InputForm 

All of these return the result

4.589999999999999999999998802094999`15.*^-25 

You can get more digits by increasing the 15 digits precision.

For example, with 34 digits precision the result returned is

4.5899999999999999999999988020950000000000000000001613`34.*^-25 
Somos
  • 5.3k
  • 1
  • 10
  • 17