Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 37 for abs (0.2 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. 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)
  4. android/guava/src/com/google/common/math/DoubleMath.java

            return rint(x);
    
          case HALF_UP:
            {
              double z = rint(x);
              if (abs(x - z) == 0.5) {
                return x + copySign(0.5, x);
              } else {
                return z;
              }
            }
    
          case HALF_DOWN:
            {
              double z = rint(x);
              if (abs(x - z) == 0.5) {
                return x;
              } else {
                return z;
              }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 18.9K bytes
    - Viewed (0)
  5. 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)
  6. android/guava/src/com/google/common/math/IntMath.java

            break;
          case HALF_EVEN:
          case HALF_DOWN:
          case HALF_UP:
            int absRem = abs(rem);
            int cmpRemToHalfDivisor = absRem - (abs(q) - absRem);
            // subtracting two nonnegative ints can't overflow
            // cmpRemToHalfDivisor has the same sign as compare(abs(rem), abs(q) / 2).
            if (cmpRemToHalfDivisor == 0) { // exactly on the half mark
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  7. tensorflow/c/experimental/gradients/math_grad_test.cc

                                                 /*dims*/ {3, 3},
                                                 /*abs_error*/ 0));
        ASSERT_NO_FATAL_FAILURE(CheckTensorValue(outputs[1], dB_vals[i],
                                                 /*dims*/ {3, 3},
                                                 /*abs_error*/ 0));
        outputs[0]->Unref();
        outputs[1]->Unref();
      }
    }
    
    TEST_P(CppGradients, TestSqrtGrad) {
    C++
    - Registered: Tue Mar 26 12:39:09 GMT 2024
    - Last Modified: Thu Apr 13 17:32:14 GMT 2023
    - 16.3K bytes
    - Viewed (0)
  8. 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)
  9. src/test/java/jcifs/tests/FileAttributesTest.java

                        // only have second precision
                        // there seems to be some random factor (adding one second)
                        int diff = Math.abs((int) ( ( time / 1000 ) - ( f.lastModified() / 1000 ) ));
                        Assert.assertTrue("Have set time correctly", diff < 2);
                    }
                    else {
    Java
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Thu Jan 05 13:09:03 GMT 2023
    - 12.3K bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/cgotest/overlaydir.go

    func OverlayDir(dstRoot, srcRoot string) error {
    	dstRoot = filepath.Clean(dstRoot)
    	if err := os.MkdirAll(dstRoot, 0777); err != nil {
    		return err
    	}
    
    	srcRoot, err := filepath.Abs(srcRoot)
    	if err != nil {
    		return err
    	}
    
    	return filepath.Walk(srcRoot, func(srcPath string, info os.FileInfo, err error) error {
    		if err != nil || srcPath == srcRoot {
    			return err
    		}
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon May 22 20:56:09 GMT 2023
    - 1.7K bytes
    - Viewed (0)
Back to top