       (Double/longBitsToDouble
         (if-not (neg? bits)
           bits
-          (bit-not (bit-xor bits Long/MIN_VALUE)))))))
+          (bit-not (flip-long-sign bits)))))))
 
 
 (alter-meta! #'->DoubleLexicoder assoc :private true)

        (recur (inc i)
               (->
                 (aget ^bytes data (+ offset i))
                 (long)
                 (bit-and 0xFF)
                 (as-> b (if (neg? b) (+ b 256) b))
                 (bit-shift-left (- 56 (* i 8)))
                 (+ value)))
        ; Unflip sign bit.
        (bit-xor value Long/MIN_VALUE)))))


(alter-meta! #'->LongLexicoder assoc :private true)

      (let [bits (Double/doubleToRawLongBits
                   (if (zero? value) 0.0 (double value)))]
        (if (neg? bits)
          (flip-long-sign (bit-not bits))
          bits))))

  (decode*
