Jump to content

Wikipedia:Reference desk/Archives/Computing/2024 May 5

From Wikipedia, the free encyclopedia
Computing desk
< May 4 << Apr | May | Jun >> May 6 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


May 5[edit]

Logarathmic scale for page views[edit]

In page information, if you click no. of page views, you see a graph for daily page views for a period. You also get a logarithmic scale. What additional insight does it provide, and is thus helpful? ExclusiveEditor Notify Me! 10:14, 5 May 2024 (UTC)[reply]

It is useful when there are large variations in the edit counts over time as a logarithmic scale expands low numbers. An illustrative example might be an article that describes a current event: As it happens and interest is high, there may be hundreds of edits per day, whereas some time after, as interest wanes or the article is reasonably complete, those numbers might decrease to a few edits per day. On a linear scale, those few edits (representing just a hundredth of the peak) tend to disappear, hardly distinguishable from zero. On a logarithmic scale they are clearly visible, making it possible to follow periods of high and low activity on the same graph. Addendum: replace "edit" by "view"... --Wrongfilter (talk) 10:55, 5 May 2024 (UTC)[reply]
@ExclusiveEditor: See e.g. page views for Bernard Hill who died 5 May. Without logarithmic scale you cannot even see how many views he got before, and it was far more than most articles. PrimeHunter (talk) 08:30, 8 May 2024 (UTC)[reply]

Two zeros in Ones' complement[edit]

Computers using ones' complement have two ways to represent zero. Back in my day, I used Fortran on such a machine. I just checked for 0. I assume that is the way it was with all high-level languages on such a machine (correct me if I'm wrong).

But in assembler or machine language, would you have to check for both forms of zero? Bubba73 You talkin' to me? 22:26, 5 May 2024 (UTC)[reply]

I don't know how the different languages handled it, but the article does say [...] a side effect of negative zero is that software must test for negative zero. RudolfRed (talk) 02:13, 6 May 2024 (UTC)[reply]
Some ones' complement models (e.g. the Electrologica X1) had a zero-test as part of the machine instructions (see here, section 2.4.3  Condition-setting), so one test sufficed for plus-or-minus zero. When using high-level languages such as FORTRAN or ALGOL, the issue was not visible to the user.  --Lambiam 13:38, 6 May 2024 (UTC)[reply]
One's complement was used in older models (PDP, LINC) and programmers had to handle value properly. By 1985, this was codified in IEEE 754, stating that -0 and +0 are the same value and programming languages should treat them as such. You mention Fortran. Unless it is a very old version, Fortran's compiler treated zero as unsigned, so both -0 and +0 were just 0, converted as such in the compiler. 75.136.148.8 (talk) 17:31, 6 May 2024 (UTC)[reply]
Thanks for the replies. You speak of early Fortran, the first Fortran I used was FORTRAN IV and it must have handled that for the programmer. Bubba73 You talkin' to me? 04:27, 7 May 2024 (UTC)[reply]
You mentioned using a 1s complement machine and using Fortran. That tells me you must have been using a DEC F40 on a PDP. Fortran IV was ported to other old mainframes, primarily for education purposes, but DEC ported it (as F40) for the PDP series for business use. DEC F40's compiler handled positive/negative zero, but also gave the programmer the ability to distinguish between them if desired. If you were using a different Fortran on a different computer, I have to assume that that version of Fortran also handled positive/negative zero in the compiler in much the same way. 12.116.29.106 (talk) 12:18, 7 May 2024 (UTC)[reply]
It was actually on a CDC 6400. We used a Fortran IV textbook. CDC had enhancements to Fortran IV, but I didn't know about them until I bought my own CDC Fortran manuals a few years later Bubba73 You talkin' to me? 02:08, 8 May 2024 (UTC)[reply]