Ad
  • Custom User Avatar

    One further issue is that you're using "g" for gallons, but this is the SI symbol for grams. The standard symbol for gallons (both US and Imperial) is "gal".

  • Custom User Avatar

    You need to be more specific (and less parochial) about units. E.g. your gallons appear to be US gallons, but the most of the world uses imperial gallons. This applies to a number of different measures, mainly of volume. See: https://en.wikipedia.org/wiki/Comparison_of_the_imperial_and_US_customary_measurement_systems. Also "English" is the wrong way to describe US/Imperial units.

  • Custom User Avatar

    Just to follow up on this - my NASM solution was failing because it wasn't handling edge cases with large negative values properly. What threw me was that the same logic was working for a similar solution in C, so I suspect that the C test cases are lacking test cases with large negative values, otherwise some of the existing C solutions would fail. The NASM test cases are good.

  • Custom User Avatar

    Hi - sorry, I think I may have been mistaken - it's probably my code after all.

  • Custom User Avatar

    The test cases for NASM seem to be completely wrong