Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
testing a number's quare root is an integer and casting to a value?
#11
(01-27-2025, 11:33 PM)SMcNeill Wrote: Just curious:  Is anyone else's OCD trying to explode at the title of this topic?  QUARE ROOT??!! 

GAAAAAHHHHH!!!!!!
Hahaha, mighta started as a typo, but now I feel like a Quare Root should be its own thing! 
What could that be used for? Hmmmm  Tongue

(01-27-2025, 11:29 PM)bplus Wrote: What is Mod 1 ?
Code: (Select All)
For i = 1 To 10

    MySquareRoot! = Sqr(i)

    Print i, MySquareRoot!, MySquareRoot! Mod 1, _IIf((MySquareRoot! Mod 1 = 0), "Integer", "Not Integer")
Next
looks like mod 1 = 0 for everything!

I give the testing of a number as an integer with Mod 1, a mod 1 rating. Smile


From Wiki:
Quote:What is mod 1 in math?
The range of values for an integer modulo operation of n is 0 to n − 1. a mod 1 is always 0. When exactly one of a or n is negative, the basic definition breaks down, and programming languages differ in how these values are defined.
I probably shoulda not even mentioned MOD, that wasn't going to work!
Reply


Messages In This Thread
RE: testing a number's quare root is an integer and casting to a value? - by madscijr - 01-28-2025, 01:43 AM



Users browsing this thread: 2 Guest(s)