license import { Atanh , KernelConfig } from '@tensorflow/tfjs-core' ; import { unaryKernelFunc } from '../kernel_utils/kernel_funcs_utils' ; import { CHECK_NAN_SNIPPET } from '../unaryop_gpu' ; const ATANH = CHECK_NAN_SNIPPET + `
  if ((x < -1.0) || (x > 1.0)) return NAN;
return (log(1.0 + x) - log(1.0 - x)) / 2.0;` ; export const atanh = unaryKernelFunc ( { opSnippet : ATANH } ) ; export const atanhConfig = { kernelName : Atanh , backendName : 'webgl' , kernelFunc : atanh , } ;