Announcement

Collapse
No announcement yet.

VKD3D-Proton 2.8 Brings Many Improvements For Direct3D 12 On Vulkan

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #41
    Originally posted by atomsymbol

    C: int32_t abs(int32_t) { return a < 0 ? -a : a; }

    abs(-0x8000_0000) == -0x8000_0000; -0x8000_0000 < 0; it can return a negative number

    But a single-line function like abs() isn't an interesting math problem. Slightly more interesting would be to post code that completes the static check of the "abs(T)" function in a number of steps that is mostly independent from sizeof(T) where T is an integer type with a particular number of bits. Proof via simple exhaustive search of "int64_t abs(int64_t)" by enumerating 1.8e+19 options will fail to complete on any home computer in a reasonable amount of time (it would take at least 100 years to finish on a single [x86] CPU core).
    In order to implement a sound static analyzer, you need to be able to consider and prove every line of code either correct or incorrect, so a case like this needs to be included for understanding the impact of a negation operation on possible values of an expression. The software would not do an exhaustive search to find the answer since it would have the knowledge of the case already programmed into it. In this case, the possible outputs from a negation would be used when considering its effect on possible execution paths.

    My opinion is that if you knew what you pretend to know, you would not need something this simple explained to you and you definitely would not deny the utility of this piece of information (since astree needs it to be able to function properly). Also, if you knew half as much as you claimed, you would not have needed to use the exhaustive search back door. That could have easily been outsourced to a CS student at a local university or anyone you know who knows programming. My conclusion that you are pretending remains unchanged. The time to have passed the test was before I explained how easy it really was. I could go on, but it is pointless.

    My remark that you need professional help because your life could be in danger also is true:

    https://en.wikipedia.org/wiki/Grandi...ions#Diagnosis

    There are a few life threatening conditions that can be the underlying cause for your behavior. I had refrained from providing the link since I did not want to encourage DIY medicine, which I imagine you would attempt to do by reading through the Wikipedia entries and assume that is everything. That is often a mistake since if it worked, we would not need medical doctors. I am only providing it to substantiate my previous remarks so that it is not a matter of my word against yours to others reading this.

    That said, I am reminded of my college psychology class, where it was taught that you cannot force help onto people, so after offering them the resources needed for them to get help, there is nothing left to do. At least, that is one of the things I took away from its discussion of the ethics of trying to treat people (from the context of an actual expert in the field).
    Last edited by ryao; 20 December 2022, 07:20 PM.

    Comment

    Working...
    X