code: def test_log1p():
      # Eval
      assert log1p(0) == 0
      d = S(10)
      assert (
          expand_log(
              log1p(d**-1000) - log(d**1000 + 1) + log(d**1000)
          )
          == 0
      )
  
      x = Symbol("x", real=True)
  
      # Expand and rewrite
      assert log1p(x).expand(func=True) - log(x + 1) == 0
      assert log1p(x).rewrite("tractable") - log(x + 1) == 0
      assert log1p(x).rewrite("log") - log(x + 1) == 0
  
      # Precision
      assert (
          not abs(log(1e-99 + 1).evalf() - 1e-99) < 1e-100
      )  # for comparison
      assert abs(expand_log(log1p(1e-99)).evalf() - 1e-99) < 1e-100
  
      # Properties
      assert log1p(-(2 ** Rational(-1, 2))).is_real
  
      assert not log1p(-1).is_finite
      assert log1p(pi).is_finite
  
      assert not log1p(x).is_positive
      assert log1p(Symbol("y", positive=True)).is_positive
  
      assert not log1p(x).is_zero
      assert log1p(Symbol("z", zero=True)).is_zero
  
      assert not log1p(x).is_nonnegative
      assert log1p(Symbol("o", nonnegative=True)).is_nonnegative
  
      # Diff
      assert log1p(42 * x).diff(x) - 42 / (42 * x + 1) == 0
      assert (
          log1p(42 * x).diff(x)
          - log1p(42 * x).expand(func=True).diff(x)
          == 0
      )
  
file_path: sympy/sympy/codegen/tests/test_cfunctions.py
imports: from sympy.core.numbers import Rational, pi
  from sympy.core.singleton import S
  from sympy.core.symbol import Symbol, symbols
  from sympy.functions.elementary.exponential import exp, log
  from sympy.codegen.cfunctions import expm1, log1p, exp2, log2, fma, log10, Sqrt, Cbrt, hypot
  from sympy.core.function import expand_log
label_desc: Use image node_id 2 for calling a global function with example usage: test_log1p() without return types