About 1,400,000 results
Open links in new tab
  1. what is "modf ()" (a math function from C/C++ etc.) shorthand for?

    Nov 22, 2019 · In C and C++, the modf function can break floating number into fractional and integral parts. I'm curious about what does "modf" stand for. What is it shorthand for?

  2. How to separate float into an integer and a fractional part?

    Jun 2, 2014 · Certainly, the use of modf() is the best, more direct way to separate the integer from the fractional part of a floating point number. The only drawback is in case you want the integer part to …

  3. c - Can I pass NULL to modf/modff? - Stack Overflow

    The modf functions break the argument value into integral and fractional parts, each of which has the same type and sign as the argument. They store the integral part (in floating-point format) in the …

  4. How to avoid using temporary variable with std::modf?

    May 20, 2019 · std::modf(value, &value) always makes me nervous. I have to check to make sure the first parameter isn't taking by reference, otherwise there might be problems.

  5. How does the C++ function `modf` work internally?

    Jul 31, 2019 · @NathanOliver: I did see the reference, but it mentions that the function is implemented as though it were done the way they showed, plus the question just gets kicked down the line: how …

  6. How can you use math.modf in a dataframe? - Stack Overflow

    The math.modf doc clearly says it returns a tuple of two signed floats (fractional_part, integer_part). Not a string. And if you only want the integer part, you could slice [0], but really you don't even need …

  7. Is it possible to roll a significantly faster version of modf

    modf should be a very fast function indeed, so the problem might be that it is still a function (ie, not being inlined). You could try using exactly the same code from the library but in an inline static function in a …

  8. c - How to properly use modf - Stack Overflow

    How to properly use modf Asked 12 years, 1 month ago Modified 8 years ago Viewed 1k times

  9. Getting the fractional part of a float without using modf ()

    I'm developing for a platform without a math library, so I need to build my own tools. My current way of getting the fraction is to convert the float to fixed point (multiply with (float)0xFFFF, ca...

  10. arm - STM32L0 SPI Mode always return MODF - Stack Overflow

    Aug 8, 2024 · The weird thing is, when ever it tries to utilize SPI functions (Transmit, Receive, and Transmit/Receive), it will always return HAL_SPI_ERROR_MODF. The SPI1 only have LSM6DSR …