Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for abs (0.14 sec)

  1. src/bytes/reader.go

    	r.prevRune = -1
    	var abs int64
    	switch whence {
    	case io.SeekStart:
    		abs = offset
    	case io.SeekCurrent:
    		abs = r.i + offset
    	case io.SeekEnd:
    		abs = int64(len(r.s)) + offset
    	default:
    		return 0, errors.New("bytes.Reader.Seek: invalid whence")
    	}
    	if abs < 0 {
    		return 0, errors.New("bytes.Reader.Seek: negative position")
    	}
    	r.i = abs
    	return abs, nil
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/gradients/grad_test_helper.cc

          ASSERT_NEAR(dnumerical[j], danalytical[j], abs_error);
        }
        TF_DeleteTensor(analytical_tensor);
        TF_DeleteTensor(numerical_tensor);
        delete[] danalytical;
        delete[] dnumerical;
        outputs[i]->Unref();
      }
    }
    
    void CheckTensorValue(AbstractTensorHandle* t, absl::Span<const float> manuals,
                          absl::Span<const int64_t> dims, double abs_error) {
      TF_Tensor* analytical_tensor;
    C++
    - Registered: Tue Mar 26 12:39:09 GMT 2024
    - Last Modified: Wed Feb 28 13:53:47 GMT 2024
    - 5K bytes
    - Viewed (0)
  3. tensorflow/c/experimental/gradients/grad_test_helper.h

        Model model, Model grad_model, AbstractContext* ctx,
        absl::Span<AbstractTensorHandle* const> inputs, bool use_function,
        double abs_error = 1e-2);
    
    void CheckTensorValue(AbstractTensorHandle* t, absl::Span<const float> manuals,
                          absl::Span<const int64_t> dims, double abs_error = 1e-2);
    
    Model BuildGradModel(Model forward, GradientRegistry registry);
    
    }  // namespace internal
    }  // namespace gradients
    C
    - Registered: Tue Mar 26 12:39:09 GMT 2024
    - Last Modified: Thu Jan 14 20:36:51 GMT 2021
    - 1.5K bytes
    - Viewed (0)
  4. internal/s3select/json/record.go

    	// See golang.org/issue/6384 and golang.org/issue/14135.
    	// Like fmt %g, but the exponent cutoffs are different
    	// and exponents themselves are not padded to two digits.
    	abs := math.Abs(f)
    	fmt := byte('f')
    	if abs != 0 {
    		if abs < 1e-6 || abs >= 1e21 {
    			fmt = 'e'
    		}
    	}
    	dst = strconv.AppendFloat(dst, f, fmt, -1, 64)
    	if fmt == 'e' {
    		// clean up e-09 to e-9
    		n := len(dst)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Feb 25 20:31:19 GMT 2022
    - 5.2K bytes
    - Viewed (0)
  5. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/MappedRange.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.internal.idn
    
    import kotlin.math.abs
    import okio.ByteString
    
    internal sealed interface MappedRange {
      val rangeStart: Int
    
      data class Constant(
        override val rangeStart: Int,
        val type: Int,
      ) : MappedRange {
        val b1: Int
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  6. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/MappingTables.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.internal.idn
    
    import kotlin.math.abs
    import kotlin.streams.toList
    import okio.Buffer
    
    /** Index [table] for compactness as specified by `IdnaMappingTable`. */
    fun buildIdnaMappingTableData(table: SimpleIdnaMappingTable): IdnaMappingTableData {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  7. tensorflow/c/eager/gradient_checker_test.cc

    void CompareNumericalAndManualGradients(
        Model model, AbstractContext* ctx,
        absl::Span<AbstractTensorHandle* const> inputs, int input_index,
        float* expected_grad, int num_grad, bool use_function,
        double abs_error = 1e-2) {
      Status s;
      AbstractTensorHandlePtr numerical_grad;
      {
        AbstractTensorHandle* numerical_grad_raw;
        s = CalcNumericalGrad(ctx, model, inputs, input_index, use_function,
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Apr 14 10:03:59 GMT 2023
    - 6.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/math/DoubleUtils.java

      }
    
      static double bigToDouble(BigInteger x) {
        // This is an extremely fast implementation of BigInteger.doubleValue(). JDK patch pending.
        BigInteger absX = x.abs();
        int exponent = absX.bitLength() - 1;
        // exponent == floor(log2(abs(x)))
        if (exponent < Long.SIZE - 1) {
          return x.longValue();
        } else if (exponent > MAX_EXPONENT) {
          return x.signum() * POSITIVE_INFINITY;
        }
    
        /*
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 28 15:37:52 GMT 2021
    - 5.1K bytes
    - Viewed (0)
  9. src/main/webapp/js/admin/plugins/form-validator/uk.js

    f(a=a.replace(/[^0-9]/g,""),a.length<9)return!1;var b=!1,c=[];c=a.split("");var d=Number(c[7]+c[8]),e=c[0],f=c[1];if(0===e&&f>0)return!1;for(var g=0,h=0;h<7;h++)g+=c[h]*(8-h);for(var i=0,j=0,k=8;k>=2;k--)i+=c[j]*k,j++;for(;g>0;)g-=97;return g=Math.abs(g),d===g&&(b=!0),b||(g%=97,g>=55?g-=55:g+=42,g===d&&(b=!0)),b},errorMessage:"",errorMessageKey:"badUKVatAnswer"}),a.formUtils.addValidator({name:"ukutr",validatorFunction:function(a){var b=[0,6,7,8,9,10,5,4,3,2],c=[2,1,9,8,7,6,5,4,3,2,1],d=0;if(/\d...
    JavaScript
    - Registered: Mon Apr 22 08:04:10 GMT 2024
    - Last Modified: Mon Jan 01 05:12:47 GMT 2018
    - 1.4K bytes
    - Viewed (0)
  10. misc/cgo/gmp/gmp.go

    // Neg sets z = -x and returns z.
    func (z *Int) Neg(x *Int) *Int {
    	x.doinit()
    	z.doinit()
    	C.mpz_neg(&z.i[0], &x.i[0])
    	return z
    }
    
    // Abs sets z to the absolute value of x and returns z.
    func (z *Int) Abs(x *Int) *Int {
    	x.doinit()
    	z.doinit()
    	C.mpz_abs(&z.i[0], &x.i[0])
    	return z
    }
    
    /*
     * functions without a clear receiver
     */
    
    // CmpInt compares x and y. The result is
    //
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Apr 11 16:34:30 GMT 2022
    - 9.5K bytes
    - Viewed (0)
Back to top