Skip to content
Magenaut

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

precision

Float not correct in MySQL

November 20, 2022 by Magenaut

I am entering ‘35444650.00’ as a float into my MySQL and it keeps reformatting to 35444648.00, any help welcome…

Categories MySQL, Q&A Tags floating-point, mysql, php, precision Leave a comment

How do I see high-precision query times in mysql command line?

November 15, 2022 by Magenaut

I’m working through some optimization work, and I’ve noticed that in some mysql dumps people post in articles and questions (which I cannot find again now that I’m actually looking), there are high-precision execution times (0.05985215 sec instead of 0.06 sec).

Categories MySQL, Q&A Tags command-line-interface, mysql, precision, timer Leave a comment

PHP – Floating Number Precision

October 21, 2022 by Magenaut

Use round($result, 2) on the result to round it to 2 decimal places.

Categories PHP, Q&A Tags floating-accuracy, floating-point, php, precision Leave a comment

Set precision for a float number in PHP

October 17, 2022 by Magenaut

I get a number from database and this number might be either float or int.

Categories PHP, Q&A Tags php, precision, rounding Leave a comment

Point in Polygon algorithm giving wrong results sometimes

October 16, 2022 by Magenaut

I saw on StackOverflow a “point in polygon” raytracing algorithm that I implemented in my PHP Code. Most of the time, it works well, but in some complicated cases, with complex polygons and vicious points, it fails and it says that point in not in polygon when it is. For example: You will find here … Read more

Categories PHP, Q&A Tags php, pip, point, polygon, precision Leave a comment

How to properly round-up half float numbers?

August 19, 2022 by Magenaut

I am facing a strange behavior of the round() function:

Categories Python, Q&A Tags floating-point, precision, python, python-3.x, rounding Leave a comment

Double precision floating values in Python?

August 15, 2022 by Magenaut

Are there data types with better precision than float?

Categories Python, Q&A Tags precision, python, types Leave a comment

Recent Comments

  • silverplugins217 on How to add placeholder for contact form7 for dropdown?
  • Shreyas Ikhar on How to add a custom CSS class to core blocks in Gutenberg editor?
  • Magenaut on How to call function on timer ASP.NET MVC
  • Ebaad Uddin on How to call function on timer ASP.NET MVC
  • michealSmith07 on Is there a way to dynamically refresh the less command?

Tags

.net adobe-illustrator adobe-photoshop ajax arrays asp.net asp.net-core asp.net-mvc bash c# css database django eloquent express html java javascript jquery json laravel laravel-4 laravel-5 laravel-8 linux list mongodb mongoose mysql node.js npm pandas php python python-3.x react-hooks react-native react-router reactjs redux regex sql string typescript wordpress
© 2023 Magenaut • Built with GeneratePress