C++ Questions

Pages: 1... 111213
With the input values hard coded in main, the triangle is equilateral with side lengths 1'000.000 and the observed angles are all 120 degrees, so the occupied point is in the centre of the triangle .

So this is the output of the above program:


vx1 is 1000.0000000000000000
vy1 is 0.0000000000000000
vx2 is 500.0000000000000000
vy2 is 866.0254037844385948
crossProduct is 866025.4037844386184588
dotProduct is 500000.0000000000000000
AngleRadians.rad is 1.0471975511965976
vx1 is -500.0000000000000000
vy1 is -866.0254037844385948
vx2 is 500.0000000000000000
vy2 is -866.0254037844385948
crossProduct is 866025.4037844386184588
dotProduct is 499999.9999999998835847
AngleRadians.rad is 1.0471975511965979
vx1 is -500.0000000000000000
vy1 is 866.0254037844385948
vx2 is -1000.0000000000000000
vy2 is 0.0000000000000000
crossProduct is 866025.4037844386184588
dotProduct is 500000.0000000000000000
AngleRadians.rad is 1.0471975511965976
Kvalue0 0.8660254037844387
Kvalue1 0.8660254037844390
Kvalue2 0.8660254037844387
TotalK is 2.5980762113533165
Entering calculateOccupiedPoint
SumKE is 1299.0381056766582333
SumKN is 750.0000000000003411
Occupied Point is 500.0000000000000000 288.6751345948129597
Distance to PtA: 577.3502691896258057 units
Distance to PtB: 577.3502691896255783 units
Distance to PtC: 577.3502691896258057 units



The other thing about chatGPT from my POV is that I like to use strong types a lot, getting it to do that would be rather tricky, I imagine.
You have very thoroughly demonstrated the problem with AI. It cannot reason. All it does is mash up patterns into new patterns.

That is not how human brains work. Even for simple tasks AI cannot be trusted to get the task correct — you must always verify.

This is a common conceptual issue that I have had to confront with people for literally decades. We are socialized to have computers _help_ us with all kinds of tasks. Just about every thing you can do with a computer has wizards and tutorials and specialized software to help/lead/guide you through it.

Not so with programming. While IDEs and stuff do help you manage code, it cannot really help you tell it what to do. It doesn’t understand algebra, or geometry, three-dimensional transforms, or anything. It can do those things — as per your instructions — really fast, but it has no idea (conceptual or otherwise) of what it is doing. It is _stupid_.

So when people want to have AI “help” them program something they don’t really understand, they are mistakenly asking the computer to understand something for them! The result is buggy code cobbled together from other sources — none of which you have individually vetted to begin with, but combined all bets are now off, since all the careful construction (assuming one or more of the sources were in fact carefully and correctly designed) is now gone! You now have a regurgitated version of something that _pretends to you_ that it looks right...

It strikes at the same reason why you don’t throw out old code and rewrite things from scratch every few years. All that old code has had zillions of people look it over for years, making corrections and catching corner cases that new code just doesn’t.

AI is a pretty illusion. It promises good and cool stuff, but it really is not possible today to build yourself a SkyNet.

@Duthomhas

Yes you are right.

But I think there is room for it to be used for simple things, but as you said, one needs to check it, and it may only be a starting point in that one may want to edit the code a bit. And to check it, one needs to know what they are doing to start with. I just asked chatGPT to produce code for a Pascals Triangle, and it worked well.

I also find that chatGPT is sometimes better answering questions rather than me searching the internet. You know those situations where one spends an hour with Google, and isn't much wiser afterwards? Maybe because one doesn't have the particular word to describe precisely what to search for, just some related words. Obviously chatGPT has a cut off date, so a Google search as well could be a good thing to possibly find more up to date info, along with a look at the wiki pages.
> I also find that chatGPT is sometimes better answering questions rather than me searching the interne
Some people think that search engine results are getting worse as time goes on, and one hypothesized reason is that AI-generated results are diluting the quality of actual results. Other people just say it's Google itself ruining the search engine with trying to manually derank or censor things but who knows.
Some people say you get better results if you put "before:2022" or "before:2021" in your search query to filter out newer results.

https://www.reddit.com/r/artificial/comments/1c7fvam/ai_has_made_google_search_so_bad_people_are/
BubblyMcnutty (13d ago)
"Have to say I'm very disappointed with Google search but it began before AI was a thing. So much useless paid content, I couldn't even find a clinic near my home on Google Maps because they did not advertise. Try to find honest critical reviews about a hit TV show and you get a deluge of payola articles singing its praises even if you specifically searched for more scathing reviews. It's absurd but hey no successful company lasts forever, if Google continues down this path one day the term to "google something" may be all that's left of them, similar to how we might still say we'll "tape something" even though we've long moved past video/cassette tapes."
Last edited on
The increasingly poor quality of search results drives me bonkers, but it isn’t actually Google’s fault... (at least, not intentionally)...

YouTube actually has quite a few videos on why “search engines suck now”. tl;dr: Capitalism happened. The system has been gamed to near uselessness. (The fact that it still works pretty well (and hasn’t totally failed) is actually pretty impressive.)
Last edited on
The other thing I wanted to say about AI is that for us Ordinary Cats and Dogs™, probably our main active* exposure to AI is through chatGPT. But there are organisations that are doing very good, and very bad things such as: AI in medical imaging, and Deep Fake Video, respectively.

* I say active meaning when we actively use an AI tool, as opposed to being fed the results of AI process, such as info one might receive through social media for example.

With web searches, the ranking thing is commercial, wouldn't it be better if non commercial things were de-ranked? That would be better for searching if one wanted an alternative to wiki pages, say.
Last edited on
I agree with the search fiasco and the current state, but it does leave room for other groups to sweep the rugs under Google's momentum for something less top ad heavy and whittled. Same is true with Amazon searches, can't find what is so obvious in a search without going through members suggestions after their logarithms run the gambit for profits!

Interesting...
Brain Really Uses Quantum Effects, New Study Finds:
https://www.youtube.com/watch?v=R6G1D2UQ3gg

After the negativity, Sabine talks about the paper that finds evidence for microtubules displaying quantum effects. Of course we need to keep an open mind, along with some needed skepticism to arrive at a much clearer ultimate understanding...still early.

One huge case usage of quantum pc's/AI now is in producing protein structures and medicines that would have taken us hundreds of years and beyond to produce. Our arsenal against the bugs and diseases have been reduced with resistance and the time/cost effects of human trials, these digital lock-n-key magnifying lenses should make things more streamlined and provide a plethora of new solutions.

These will be explosive in the oncoming years and it will dream up of new ways that nature has not even "though" about. As with everything else, corporate greed will drive the technology and setbacks.

We need a new term to describe the "collective AI" to mean all the different technologies that can be stringed together to make a "smarter" entity that is beyond the capabilities of what humans can do standalone.
Registered users can post here. Sign in or register to post.
Pages: 1... 111213