Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,201,702 members, 7,979,378 topics. Date: Saturday, 19 October 2024 at 07:31 AM |
Nairaland Forum / Science/Technology / Programming / What Is 1.0? (2024 Views)
Api-ms-win-crt-runtime-l1-1-0.dll File Is Missing And 0×80240017 Error / Official Release Of Bucketjs Library Version 0.1.0 (2) (3) (4)
What Is 1.0? by toheebDOTcom(m): 10:38am On Oct 07, 2016 |
As a programmer, is 1.0 - an integer? - a float? - both integer and float? As a mathematician, is 1.0 - An integer? - A whole number? - A decimal number? - or a combination of what and what? I came by this question some minutes ago, I studied mathematics as a course, now in a programming field and I must confess, it took some reasonings before I made a conclusion. 98% of Google Searches doesn't support my assertion, but the 2% is enough to back me up, at least some people reason like I did. Without influencing your own thoughts, I won't say my own conclusion yet... I'm not going to mention some gurus in the section, it's for everyone to answer. So, What is really 1.0? |
Re: What Is 1.0? by talk2hb1(m): 11:05am On Oct 07, 2016 |
2% is not enough bro (Statistically speaking) its only in medicine that 1% marginal error is permissible but yours is about 98% |
Re: What Is 1.0? by seunthomas: 11:24am On Oct 07, 2016 |
1.0 is a floating point number or a double. Its not an integer. The difference is in the degree of accuracy provided by the decimal after the whole number. I am not a mathematician but i assume it would be a decimal number also. Once you have a dot(.) after the whole number it cant be called an integer or whole number anymore. |
Re: What Is 1.0? by toheebDOTcom(m): 11:33am On Oct 07, 2016 |
talk2hb1:I know where you are going to... Good to hear you say Statistically, Assumption is a major backbone of Statistics. This time around, statistics can't be used because we don't want an assumption but fact! Real analysis comes in here... |
Re: What Is 1.0? by toheebDOTcom(m): 11:44am On Oct 07, 2016 |
seunthomas: Nice assumption!! But you do agree with me that 1 is an integer, right? and 1.0 = 1 So are we in the position to validate 1.0 as an integer? ************* Concerning your statement about having a '.' implies it is not a whole number or integer is NOT really true. The simple answer is 1.0 = 1 + 0× 1/10 = 1 + 0 = 1 Which is a whole number. I know we were taught that when we see a point, then it is a decimal number. na na because of the point above. |
Re: What Is 1.0? by talk2hb1(m): 12:14pm On Oct 07, 2016 |
Programming wise 1.0 is a float, while mathematically its an integer |
Re: What Is 1.0? by paranorman(m): 12:58pm On Oct 07, 2016 |
Seriously, "assumption is the major backbone of Statistics"? Forgiveable, you studied Maths. Programmatically, 1.0 is evaluated to be 1, an integer. So is 1.00000000. So I say 1.0, tecnically, is a float. Here's a case: 1.2 is approximately 1. So is 1.2333399999 - given that we want a whole number. This numbers satisfy some condition for approximation; the number proceeding that the last digit we want to approximate to should be 5 or more. Condition can be thrown away, as in case of 1.25666 approximated to 1.2, programmatically. Now Imagine the condition is based on a base 2 scale?! Mathematically, 1.0 = 1 = 1.01 approximated to 1 dec. place. (given it satisfy what our initial condition for approx.). Error is neglible, with respect to the SCOPE of enquiry and OBJECTIVES. Conclusively, 1.0, programatically is evaluated as/to 1, except we 'state' otherwise. '0' after the dec point justs increases accuracy/precision in cases where our possible value(s) belong to a set of real numbers. So, you actually determine what the number is, given you 'created' it; as 1.0 can be 1 or 1.0112 if you don't know how it came to be. Mathematically, we can prove this by induction. If 1 * a = a, and 1.0 * a = a.0 = a, where a€R, then 1.0 = 1. Just as 1^0 = 1.0^0 = 1. As for you basing my dear Statistics on Assumption, what if I told you that randomization is not random? Please sir, don't eever say such besides we 'gods' of Statistics, it makes us pity your ignorance/navity in a disconcerting way. Seriously is worrying. That's another topic for another day. Let's not derail. |
Re: What Is 1.0? by Nobody: 1:18pm On Oct 07, 2016 |
toheebDOTcom: As @seunthomas rightly said, in programming it's either a double or a floating point number and the degree of accuracy is what differentiates it from a whole number. Now while 1.0 = 1 in Mathematics, 1.0 === 1 in programming will return false. Furthermore in JavaScript running: alert(typeof(1.0)) ; returns "number" both for floating point numbers and Integers because every number in JavaScript is just a number, take note. So as far as I'm concerned, 1.0 in most programming languages is a float/double (In JS, it's just "number" but in Mathematics, It's still a float but I'd leave that to the Mathematicians to argue. PHP: if (is_float(1.0)) { print "true"; } else { print "false"; } For the doubting thomas: if(1 === 1.0) { print "true"; } else { print "false"; } |
Re: What Is 1.0? by directonpc(m): 2:13pm On Oct 07, 2016 |
Who this thing help? |
Re: What Is 1.0? by toheebDOTcom(m): 2:50pm On Oct 07, 2016 |
paranorman:Hehehe... **one of those moments you will be happy you used the right word** I quote myself again... toheebDOTcom: Notice the 'a' not 'the' as you wrote...
Coming from PHP, not really php alone since all programming Langs tend to use the same binary computation when comparing number. I agree with you on "by evaluation", but on comparison, Programmatically 1.0 !== 1. It won't! because computers sees decimal numbers as an approximate number. For such comparison, PHP has this function called bccomp that can be used in such case. Again it is not a bug but how it works... you can read more at floating-point-gui.de (I'm not sure if I get the address correctly, just google it).
Hmm, Oga, Calm down! Mbanu! *what that means?* He no reach this level na... You dey confuse yourself gansef... Anyways, commenting on what makes sense to me, Programmatically, as you mostly said ,1.0 is not evaluated as 1.0. Computers compares numbers in a different way than we were both taught.
I get you, blindly defending your course. Yes, Randomization is not random. And let me tell you, Randomization is a major topic under Optimisation Theory. As Changes is to Calculus. Are you calling yourself 'gods'? And you are such adamant? Have you done statistical inference? statistical hypothesis? Normal Distribution,...? Those are core of statistics, and if you are telling me there is no big deal of assumption, go and revisit your course again. Okay, lemme come straight to you, whenever you are told to take a sample distribution, study it and come up with a conclusion to summarise the whole distribution, then you've made an assumption based on a little distribution. I hope that is clear? Computer Science might have been drafted out of mathematics but it doesn't always work like it does in mathematics. Thank you for your contribution though. |
Re: What Is 1.0? by toheebDOTcom(m): 3:00pm On Oct 07, 2016 |
directonpc:A programmer dealing with money. |
Re: What Is 1.0? by directonpc(m): 3:16pm On Oct 07, 2016 |
toheebDOTcom:Like making a square wheel will make cars travel faster and consume less energy? |
Re: What Is 1.0? by toheebDOTcom(m): 3:19pm On Oct 07, 2016 |
@danielthegeek, @seunthomas In addition to what you've said, coming from php var_dump(1.0) //float var_dump(1) // int No args about the above! When it comes to validation, depending on which function you used, if it were to be php's filter_var(1.0, FILTER_VALIDATE_INT) // true but var_dump(1.0) // float So it is Validated as int, which is mathematically right. However, filter_var('1.1‘, FILTER_VALIDATE_INT) // false Did you notice that interesting part? I know there is probably no HOLY GRAIL answer, and I know you might not want to use that validation in all cases, but it's one of those moment you laugh over how a programming language might not be perfect or accurate at all cost. Like I said, the question popd up and I think it will be interesting to talk about it. Thanks for your input.. |
Re: What Is 1.0? by toheebDOTcom(m): 3:20pm On Oct 07, 2016 |
directonpc: na you know oo. |
Re: What Is 1.0? by paranorman(m): 3:26pm On Oct 07, 2016 |
toheebDOTcom:thanks. I think you're right on the programming aspect. as for the statistics, we shall come to that another day.. Hehehehehe |
Re: What Is 1.0? by directonpc(m): 3:27pm On Oct 07, 2016 |
toheebDOTcom:From the first post they seem to be an answer already na. That 90 something percent go with. But anyway this is a good discussion to burn time on. I refuse to turn on the circuit in my brain that works on mathematics. I turned it off the day I finished my BSc. Una think say na difference between 1.0 and 1 Google take beat AOL, bing, yahoo and co? |
Re: What Is 1.0? by toheebDOTcom(m): 3:35pm On Oct 07, 2016 |
paranorman:I feel you bro! As for the statistics, hala me anytime. Thanks for contributing.. |
Re: What Is 1.0? by Nobody: 3:38pm On Oct 07, 2016 |
in JAVA/PHP it is a FLOAT - that bit i know, but you can cast it to an integer in both languages. |
Re: What Is 1.0? by toheebDOTcom(m): 3:40pm On Oct 07, 2016 |
directonpc: Yea, I tend to have my answer but I wanted to see other people's view. I dey feel you. But you no fit owe Google, Bing or any of them #0.1 or 10kobo sha |
Re: What Is 1.0? by directonpc(m): 3:46pm On Oct 07, 2016 |
toheebDOTcom:Lol. Though that means the debate already has an answer. 1 Like |
Re: What Is 1.0? by Nobody: 4:19pm On Oct 07, 2016 |
dhtml18: Yeah, absolutely. @ToheebDOTcom Sometimes I just look at some languages and laugh..(Most especially PHP). |
Re: What Is 1.0? by talk2hb1(m): 4:21pm On Oct 07, 2016 |
directonpc:He knew the answer from onset, he just want to know which is sweeter between Coke and Fanta 1 Like |
Re: What Is 1.0? by Nobody: 4:24pm On Oct 07, 2016 |
DanielTheGeek:When i look at some languages like PHP - I see money ($$$) instead. Most of my highest earnings as a programmer came from PHP and JAVA. If you are solid in JAVA, PHP and javaScript, you no suppose suffer again unless your village people are still on your case. 1 Like |
Re: What Is 1.0? by directonpc(m): 4:28pm On Oct 07, 2016 |
talk2hb1:Yeah. Something like that |
Re: What Is 1.0? by Nobody: 4:39pm On Oct 07, 2016 |
dhtml18:Lol |
(1) (Reply)
How To Get Jobs As A Web Developer / Learning / Lets Start A Thread For Solving Problems From Projecteuler.net
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 55 |