- How to improve pow() - 2 Updates
- Hx(Px,Px)==0 is proven to be correct (refuting halting problem proofs) - 1 Update
| Bonita Montero <Bonita.Montero@gmail.com>: Sep 06 07:08PM +0200 I've written my own pow( double, int ) and it's about 10% slower than that of MSVCRT. Where's the mistake ? double powPow( double d, int e ) { unsigned eAbs = e >= 0 ? e : -e; double v = 1.0, sq = d; for( ; eAbs; eAbs >>= 1, sq *= sq ) if( eAbs & 1 ) v *= sq; return e >= 0 ? v : 1.0 / v; } |
| Lynn McGuire <lynnmcguire5@gmail.com>: Sep 06 01:49PM -0500 On 9/6/2022 12:08 PM, Bonita Montero wrote: > v *= sq; > return e >= 0 ? v : 1.0 / v; > } You need to unroll the loop for the common cases of e == 1, e == 2, e == 3, etc. Lynn |
| olcott <polcott2@gmail.com>: Sep 06 12:56PM -0500 void Px(ptr x) { int Halt_Status = Hx(x, x); if (Halt_Status) HERE: goto HERE; return; } int main() { Output("Input_Halts = ", Hx(Px, Px)); } *THIS HAS BEEN AGREED TO* // *understanding the above code proves this* There are zero elements of infinite set of Hx/Px pairs such that the correct *partial or complete* simulation of Px by Hx reaches the final state of Px. *THIS LOGICALLY FOLLOWS (as a subset) FROM ABOVE* (A) Every element of the infinite set of Hx/Px pairs that does a correct and complete simulation of its input never reaches the final state of this input. *THIS IS THE DEFINITION OF A UTM THUS KNOWN TO BE TRUE* (B) A correct and complete simulation of this input derives the actual behavior of this input. *THIS LOGICALLY FOLLOWS FROM (A) AND (B) PREMISES* (C) The actual behavior of this input never reaches the final state of this input. When the criteria for a simulating halt decider (SHD) is to correctly predict that its complete and correct simulation of its input would never reach the final state of this simulated input then: void Infinite_Loop() { HERE: goto HERE; } *H0(Infinite_Loop)==0 // is correct* void Infinite_Recursion(int N) { Infinite_Recursion(N); } *H(Infinite_Recursion, 0x777)==0 // is correct* *Hx(Px,Px)==0 // is correct* *Halting problem proofs refuted on the basis of software engineering* ? https://www.researchgate.net/publication/361701808_Halting_problem_proofs_refuted_on_the_basis_of_software_engineering -- Copyright 2022 Pete Olcott "Talent hits a target no one else can hit; Genius hits a target no one else can see." Arthur Schopenhauer |
| You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment