{"id":6740,"date":"2021-02-25T09:44:58","date_gmt":"2021-02-25T14:44:58","guid":{"rendered":"https:\/\/blogs.mathworks.com\/cleve\/?p=6740"},"modified":"2021-02-25T10:03:52","modified_gmt":"2021-02-25T15:03:52","slug":"round-with-ties-to-even","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/cleve\/2021\/02\/25\/round-with-ties-to-even\/","title":{"rendered":"Round, With Ties to Even"},"content":{"rendered":"\r\n<div class=\"content\"><!--introduction--><p>We are considering a MATLAB Enhancement Request to support options for <tt>round(x)<\/tt> when <tt>x<\/tt> is exactly halfway between two integers.<\/p><!--\/introduction--><h3>Contents<\/h3><div><ul><li><a href=\"#efc77c0b-cbb6-4621-9b3f-270c71e48100\">Classic round<\/a><\/li><li><a href=\"#ae32c2af-7926-4bef-a2e7-afce1a265657\">roundoff<\/a><\/li><li><a href=\"#2733a2a7-1371-46f5-b406-c5e6ab9050b6\">flints<\/a><\/li><li><a href=\"#b656360e-a4a6-46c9-b93e-1c8e53c62299\"><tt>round<\/tt><\/a><\/li><li><a href=\"#348cbbe7-0ffc-4bd3-ad65-5b3f1dc63634\">test round<\/a><\/li><li><a href=\"#8dcf7272-41cb-48e9-908d-0ddb470262fc\">cities<\/a><\/li><li><a href=\"#156306c1-1c95-4844-9d56-13a855821010\">IEEE 754<\/a><\/li><li><a href=\"#d3dcbc9e-83a3-4d9a-9381-1ddca306b0b3\">Which?<\/a><\/li><\/ul><\/div><h4>Classic round<a name=\"efc77c0b-cbb6-4621-9b3f-270c71e48100\"><\/a><\/h4><p>The Classic MATLAB calculator was written in Fortran forty years ago, before IEEE 754 and before MathWorks.  It had only 71 functions and it was not easy to add more.  But one of those functions was ROUND. The help entry had only one sentence.<\/p><pre>   ROUND   ROUND(X) rounds the elements of X to the nearest integers.<\/pre><p>That doesn't say what happens when there is a tie.  The code for ROUND was essentially this one line, which relied on FLOOR.<\/p><pre>   ROUND(X) = SIGN(X)*FLOOR(ABS(X) + 0.5)<\/pre><p>In particular:<\/p><pre>   ROUND(0.5) = 1.0<\/pre><pre>   ROUND(1.5) = 2.0.<\/pre><p>When MathWorks began producing the modern versions of MATLAB in 1984, we retained this simple definition for <tt>round<\/tt>.<\/p><h4>roundoff<a name=\"ae32c2af-7926-4bef-a2e7-afce1a265657\"><\/a><\/h4><p>The function <tt>round<\/tt> can be used to clean up after roundoff.<\/p><pre class=\"codeinput\">   format <span class=\"string\">long<\/span> <span class=\"string\">e<\/span>\r\n   H = hilb(5)\r\n   X = inv(H)\r\n   X = round(X)\r\n   XH = X*H\r\n   XH = round(XH)\r\n<\/pre><pre class=\"codeoutput\">\r\nH =\r\n\r\n  Columns 1 through 3\r\n\r\n     1.000000000000000e+00     5.000000000000000e-01     3.333333333333333e-01\r\n     5.000000000000000e-01     3.333333333333333e-01     2.500000000000000e-01\r\n     3.333333333333333e-01     2.500000000000000e-01     2.000000000000000e-01\r\n     2.500000000000000e-01     2.000000000000000e-01     1.666666666666667e-01\r\n     2.000000000000000e-01     1.666666666666667e-01     1.428571428571428e-01\r\n\r\n  Columns 4 through 5\r\n\r\n     2.500000000000000e-01     2.000000000000000e-01\r\n     2.000000000000000e-01     1.666666666666667e-01\r\n     1.666666666666667e-01     1.428571428571428e-01\r\n     1.428571428571428e-01     1.250000000000000e-01\r\n     1.250000000000000e-01     1.111111111111111e-01\r\n\r\n\r\nX =\r\n\r\n  Columns 1 through 3\r\n\r\n     2.499999999998526e+01    -2.999999999997500e+02     1.049999999998995e+03\r\n    -2.999999999997500e+02     4.799999999995864e+03    -1.889999999998367e+04\r\n     1.049999999998995e+03    -1.889999999998367e+04     7.937999999993641e+04\r\n    -1.399999999998561e+03     2.687999999997693e+04    -1.175999999999111e+05\r\n     6.299999999993241e+02    -1.259999999998929e+04     5.669999999995910e+04\r\n\r\n  Columns 4 through 5\r\n\r\n    -1.399999999998561e+03     6.299999999993241e+02\r\n     2.687999999997693e+04    -1.259999999998929e+04\r\n    -1.175999999999111e+05     5.669999999995910e+04\r\n     1.791999999998769e+05    -8.819999999994377e+04\r\n    -8.819999999994377e+04     4.409999999997448e+04\r\n\r\n\r\nX =\r\n\r\n          25        -300        1050       -1400         630\r\n        -300        4800      -18900       26880      -12600\r\n        1050      -18900       79380     -117600       56700\r\n       -1400       26880     -117600      179200      -88200\r\n         630      -12600       56700      -88200       44100\r\n\r\n\r\nXH =\r\n\r\n  Columns 1 through 3\r\n\r\n     1.000000000000000e+00                         0                         0\r\n                         0     1.000000000000000e+00                         0\r\n                         0                         0     1.000000000000000e+00\r\n                         0                         0    -3.637978807091713e-12\r\n                         0                         0                         0\r\n\r\n  Columns 4 through 5\r\n\r\n                         0                         0\r\n                         0                         0\r\n                         0                         0\r\n     1.000000000000000e+00                         0\r\n                         0     1.000000000000000e+00\r\n\r\n\r\nXH =\r\n\r\n     1     0     0     0     0\r\n     0     1     0     0     0\r\n     0     0     1     0     0\r\n     0     0     0     1     0\r\n     0     0     0     0     1\r\n\r\n<\/pre><h4>flints<a name=\"2733a2a7-1371-46f5-b406-c5e6ab9050b6\"><\/a><\/h4><p><tt>round<\/tt> works on an array element-wise, mapping all elements to <i>flints<\/i>, floating point numbers whose values are integers. All values less than one-half are mapped to zero. All values larger than <tt>flintmax<\/tt> are already flints, so they are mapped to themselves.  And all values between one-half and <tt>flintmax<\/tt>, except those exactly halfway between two flints, are mapped to the nearest flints.  Pretty much everybody agrees to all of that.<\/p><p>The only leeway, and the primary reason for the Enhancement Request and this blog post, is the behavior of <tt>round<\/tt> for values exactly halfway between two flints.<\/p><h4><tt>round<\/tt><a name=\"b656360e-a4a6-46c9-b93e-1c8e53c62299\"><\/a><\/h4><p>I suggest that we add a tie-breaker option to the built-in function <tt>round<\/tt>.  If you don't use this <tt>ties<\/tt> option, <tt>round<\/tt> will continue to function as it always has.  And if you never encounter a tie, all of these options give the same results.<\/p><p>The most important option is 'even'.  There is a statistical argument to be made in its favor.  If you never encounter a tie, the mean of expected changes made by rounding data is zero.  With the 'even' option', that is still true even if you do encounter ties.<\/p><p>The 'up' option is the default and the traditional MATLAB behavior. The 'odd' and 'down' options together provide a mirror image of the 'even' and 'up' pair.<\/p><pre class=\"codeinput\">   type <span class=\"string\">Round<\/span>\r\n<\/pre><pre class=\"codeoutput\">\r\nfunction r = round(x,ties)\r\n% r = round(x) rounds the elements of x to the nearest integers.\r\n% Elements halfway between integers are rounded away from zero.\r\n%\r\n% r = round(x,'even') rounds to integers, ties to even.\r\n% r = round(x,'odd') rounds to integers, ties to odd.\r\n% r = round(x,'down') rounds to integers, ties towards zero.\r\n% r = round(x,'up') rounds to integers, ties away from zero (default).\r\n% \r\n   a = abs(x) + 0.5;\r\n   r = floor(a);\r\n   if nargin == 2\r\n       switch ties\r\n           case 'even'\r\n               m = (r == a) &amp; (mod(r,2) == 1); \r\n           case 'odd'\r\n               m = (r == a) &amp; (mod(r,2) == 0);\r\n           case 'down'\r\n               m = (r == a);\r\n           case 'up'\r\n               m = [];\r\n       end\r\n       r(m) = r(m) - 1;\r\n   end\r\n   r = sign(x).*r;\r\nend\r\n\r\n<\/pre><h4>test round<a name=\"348cbbe7-0ffc-4bd3-ad65-5b3f1dc63634\"><\/a><\/h4><pre class=\"codeinput\">   x = (0.5:1:4.5)';\r\n   xRound(x)\r\n<\/pre><pre class=\"codeoutput\">\r\n     x    round  even  down   odd \r\n\r\n   0.500     1     0     0     1\r\n   1.500     2     2     1     1\r\n   2.500     3     2     2     3\r\n   3.500     4     4     3     3\r\n   4.500     5     4     4     5\r\n<\/pre><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/rounds.png\" alt=\"\"> <\/p><h4>cities<a name=\"8dcf7272-41cb-48e9-908d-0ddb470262fc\"><\/a><\/h4><p>Download the spread sheet available at <a href=\"https:\/\/www.census.gov\/data\/datasets\/time-series\/demo\/popest\/2010s-total-cities-and-towns.html\">www.census.gov\/cities<\/a> and use the Import Wizard to select the last column. This gives us the population of 788 US cities in 2019.<\/p><pre class=\"codeinput\">    load <span class=\"string\">cities.mat<\/span> <span class=\"string\">cities<\/span> <span class=\"string\">census<\/span>\r\n<\/pre><p>Round the data to nearest 1,000.<\/p><pre class=\"codeinput\">    rcensus = 1000*Round(census\/1000);\r\n<\/pre><p>Here are the five largest cities, their population, and that population rounded.<\/p><pre class=\"codeinput\">    disp(cities(1:5))\r\n    disp([census(1:5) rcensus(1:5)])\r\n<\/pre><pre class=\"codeoutput\">    \"New York city, New York\"\r\n    \"Los Angeles city, California\"\r\n    \"Chicago city, Illinois\"\r\n    \"Houston city, Texas\"\r\n    \"Phoenix city, Arizona\"\r\n\r\n     8336817     8337000\r\n     3979576     3980000\r\n     2693976     2694000\r\n     2320268     2320000\r\n     1680992     1681000\r\n\r\n<\/pre><p>And here are the five smallest,<\/p><pre class=\"codeinput\">    disp(cities(end-4:end))\r\n    disp([census(end-4:end) rcensus(end-4:end)])\r\n<\/pre><pre class=\"codeoutput\">    \"Lakewood city, Ohio\"\r\n    \"Troy city, New York\"\r\n    \"Saginaw city, Michigan\"\r\n    \"Niagara Falls city, New York\"\r\n    \"Charleston city, West Virginia\"\r\n\r\n       49678       50000\r\n       49154       49000\r\n       48115       48000\r\n       47720       48000\r\n       46536       47000\r\n\r\n<\/pre><p>Here is the histogram of the changes made by rounding.  Despite its ragged appearance, this is uniform.<\/p><pre class=\"codeinput\">    delta = census - rcensus;\r\n    histogram(delta,40)\r\n<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/round_blog_01.png\" alt=\"\"> <p>About half of the 788 rounded down and about half rounded up. Only one city reported a 2019 population that was already a multiple of 1,000.<\/p><pre class=\"codeinput\">   disp([nnz(delta &lt; 0), nnz(delta == 0), nnz(delta &gt; 0)])\r\n<\/pre><pre class=\"codeoutput\">   396     1   391\r\n\r\n<\/pre><pre class=\"codeinput\">   k = find(delta == 0)\r\n   disp(cities(k))\r\n   disp([census(k) rcensus(k)])\r\n<\/pre><pre class=\"codeoutput\">\r\nk =\r\n\r\n    69\r\n\r\nAnchorage municipality, Alaska\r\n      288000      288000\r\n\r\n<\/pre><p>How many cities reported population ties, i.e. populations halfway between multiples of 1,000?<\/p><pre class=\"codeinput\">   k = find(mod(census,1000)==500)\r\n   disp(cities(k))\r\n   disp([census(k) rcensus(k)])\r\n<\/pre><pre class=\"codeoutput\">\r\nk =\r\n\r\n   131\r\n   189\r\n   757\r\n\r\n    \"Tallahassee city, Florida\"\r\n    \"Roseville city, California\"\r\n    \"Burien city, Washington\"\r\n\r\n      194500      195000\r\n      141500      142000\r\n       51500       52000\r\n\r\n<\/pre><p>Only one city out of the 788 reported a tie and a population that rounded to an odd multiple of 1,000, there    by triggering  the 'even' option.<\/p><pre class=\"codeinput\">   ecensus = 1000*Round(census\/1000,<span class=\"string\">'even'<\/span>);\r\n   k = find(ecensus ~= rcensus)\r\n   disp(cities(k))\r\n   disp([census(k) rcensus(k)  ecensus(k)])\r\n<\/pre><pre class=\"codeoutput\">\r\nk =\r\n\r\n   131\r\n\r\nTallahassee city, Florida\r\n      194500      195000      194000\r\n\r\n<\/pre><h4>IEEE 754<a name=\"156306c1-1c95-4844-9d56-13a855821010\"><\/a><\/h4><p>The IEEE 754 rounding modes are easily confused with the <tt>round<\/tt> function.  IEEE 754 is about hardware; <tt>round<\/tt> is software. Floating point arithmetic operations are taking place at an accuracy scale that is 16 orders of magnitude finer and at a rate that is many orders of magnitude faster.  Some of the considerations are similar, but the setting and the details are very different.<\/p><h4>Which?<a name=\"d3dcbc9e-83a3-4d9a-9381-1ddca306b0b3\"><\/a><\/h4><p>Should MATLAB have something like <tt>round(x,'even')<\/tt>? It's really a matter of taste.  I happen to like the way we've always done things.  To others, the statistical properties of round-ties-to-even might be relevant.<\/p><p>But I think the most important argument in favor of the Enhancement Request is providing compatibility with other mathematical software that doesn't offer a choice.<\/p><script language=\"JavaScript\"> <!-- \r\n    function grabCode_dd4fcdecb855489da574f04fc2b4faa3() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='dd4fcdecb855489da574f04fc2b4faa3 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' dd4fcdecb855489da574f04fc2b4faa3';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        copyright = 'Copyright 2021 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add copyright line at the bottom if specified.\r\n        if (copyright.length > 0) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\\n');\r\n\r\n        d.title = title + ' (MATLAB code)';\r\n        d.close();\r\n    }   \r\n     --> <\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_dd4fcdecb855489da574f04fc2b4faa3()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n      the MATLAB code <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; R2020a<br><\/p><\/div><!--\r\ndd4fcdecb855489da574f04fc2b4faa3 ##### SOURCE BEGIN #####\r\n%% Round, With Ties to Even\r\n% We are considering a MATLAB Enhancement Request to support options\r\n% for |round(x)| when |x| is exactly halfway between two integers.\r\n\r\n%% Classic round\r\n% The Classic MATLAB calculator was written in Fortran forty years ago,\r\n% before IEEE 754 and before MathWorks.  It had only 71 functions and\r\n% it was not easy to add more.  But one of those functions was ROUND.\r\n% The help entry had only one sentence.\r\n%\r\n%     ROUND   ROUND(X) rounds the elements of X to the nearest integers.\r\n%\r\n% That doesn't say what happens when there is a tie.  The code for ROUND\r\n% was essentially this one line, which relied on FLOOR.\r\n%\r\n%     ROUND(X) = SIGN(X)*FLOOR(ABS(X) + 0.5)\r\n%\r\n% In particular:\r\n%\r\n%     ROUND(0.5) = 1.0\r\n%\r\n%     ROUND(1.5) = 2.0.\r\n\r\n%%\r\n% When MathWorks began producing the modern versions of MATLAB in 1984,\r\n% we retained this simple definition for |round|.\r\n\r\n%% roundoff\r\n% The function |round| can be used to clean up after roundoff.\r\n\r\n   format long e\r\n   H = hilb(5)\r\n   X = inv(H)\r\n   X = round(X)\r\n   XH = X*H\r\n   XH = round(XH)\r\n\r\n%% flints\r\n% |round| works on an array element-wise, mapping all elements\r\n% to _flints_, floating point numbers whose values are integers.\r\n% All values less than one-half are mapped to zero.\r\n% All values larger than |flintmax| are already flints, so they are\r\n% mapped to themselves.  And all values between one-half and |flintmax|,\r\n% except those exactly halfway between two flints, are mapped to the\r\n% nearest flints.  Pretty much everybody agrees to all of that.\r\n% \r\n% The only leeway, and the primary reason for the Enhancement Request\r\n% and this blog post,\r\n% is the behavior of |round| for values exactly halfway between two flints.\r\n\r\n%% |round|\r\n% I suggest that we add a tie-breaker option to the built-in function\r\n% |round|.  If you don't use this |ties| option, |round| will\r\n% continue to function as it always has.  And if you never encounter a tie,\r\n% all of these options give the same results.\r\n%\r\n% The most important option is 'even'.  There is a statistical argument\r\n% to be made in its favor.  If you never encounter a tie, the mean of\r\n% expected changes made by rounding data is zero.  With the 'even' option',\r\n% that is still true even if you do encounter ties.\r\n%\r\n% The 'up' option is the default and the traditional MATLAB behavior.\r\n% The 'odd' and 'down' options together provide a mirror image of the \r\n% 'even' and 'up' pair.\r\n\r\n   type Round\r\n   \r\n%% test round\r\n   x = (0.5:1:4.5)';\r\n   xRound(x)\r\n   \r\n%%\r\n% <<rounds.png>>\r\n\r\n%% cities\r\n% Download the spread sheet available at\r\n% <https:\/\/www.census.gov\/data\/datasets\/time-series\/demo\/popest\/2010s-total-cities-and-towns.html\r\n% www.census.gov\/cities> and use the Import Wizard to select the last\r\n% column.\r\n% This gives us the population of 788 US cities in 2019. \r\n\r\n    load cities.mat cities census\r\n    \r\n%%\r\n% Round the data to nearest 1,000.\r\n%\r\n    rcensus = 1000*Round(census\/1000);\r\n\r\n%%\r\n% Here are the five largest cities, their population, and that\r\n% population rounded.\r\n\r\n    disp(cities(1:5))\r\n    disp([census(1:5) rcensus(1:5)])\r\n    \r\n%%\r\n% And here are the five smallest,\r\n\r\n    disp(cities(end-4:end))\r\n    disp([census(end-4:end) rcensus(end-4:end)])\r\n    \r\n %%\r\n % Here is the histogram of the changes made by rounding.  Despite its\r\n % ragged appearance, this is uniform.\r\n \r\n    delta = census - rcensus;\r\n    histogram(delta,40)\r\n\r\n%%\r\n% About half of the 788 rounded down and about half rounded up.\r\n% Only one city reported a 2019 population that was already a multiple\r\n% of 1,000.\r\n\r\n   disp([nnz(delta < 0), nnz(delta == 0), nnz(delta > 0)])\r\n\r\n%%\r\n\r\n   k = find(delta == 0)\r\n   disp(cities(k))\r\n   disp([census(k) rcensus(k)])\r\n\r\n   \r\n%%\r\n% How many cities reported population ties, i.e. populations\r\n% halfway between multiples of 1,000?\r\n\r\n   k = find(mod(census,1000)==500)\r\n   disp(cities(k))\r\n   disp([census(k) rcensus(k)])\r\n   \r\n%%\r\n% Only one city out of the 788 reported a tie and a population that rounded \r\n% to an odd multiple of 1,000, there    by triggering  the 'even' option.\r\n\r\n   ecensus = 1000*Round(census\/1000,'even');\r\n   k = find(ecensus ~= rcensus)\r\n   disp(cities(k))\r\n   disp([census(k) rcensus(k)  ecensus(k)])\r\n\r\n%% IEEE 754\r\n% The IEEE 754 rounding modes are easily confused with the |round|\r\n% function.  IEEE 754 is about hardware; |round| is software.\r\n% Floating point arithmetic operations are taking place at an accuracy\r\n% scale that is 16 orders of magnitude finer and at a rate that is\r\n% many orders of magnitude faster.  Some of the considerations are \r\n% similar, but the setting and the details are very different.\r\n   \r\n%% Which?\r\n% Should MATLAB have something like |round(x,'even')|?\r\n% It's really a matter of taste.  I happen to like the way we've always\r\n% done things.  To others, the statistical properties of round-ties-to-even\r\n% might be relevant. \r\n%\r\n% But I think the most important argument in favor of the Enhancement\r\n% Request is providing compatibility with other mathematical software that\r\n% doesn't offer a choice.\r\n\r\n    \r\n\r\n##### SOURCE END ##### dd4fcdecb855489da574f04fc2b4faa3\r\n-->","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/rounds.png\" onError=\"this.style.display ='none';\" \/><\/div><!--introduction--><p>We are considering a MATLAB Enhancement Request to support options for <tt>round(x)<\/tt> when <tt>x<\/tt> is exactly halfway between two integers.... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/cleve\/2021\/02\/25\/round-with-ties-to-even\/\">read more >><\/a><\/p>","protected":false},"author":78,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,16,7,37],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/6740"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/users\/78"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/comments?post=6740"}],"version-history":[{"count":3,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/6740\/revisions"}],"predecessor-version":[{"id":6776,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/6740\/revisions\/6776"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media?parent=6740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/categories?post=6740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/tags?post=6740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}