Mdiv And Mmult Bug Or Feature?

Below is a Shake script that I put together to demonstrate an issue in Shake that may not be an issue. It could be a bug or maybe this is how it is intended to work but it seems bizarre.

I created an RGBA image by making two color swatches. One for RGB (a shade of orange) and the other for the Alpha (something near medium grey). The final image is used in the SwitchMatte node.

When you click on the MDiv, the color of the SwitchMatte changes brighter. I expect that. When you click on the MMult node, the color turns dark greenish yellow. I don't expect that. I expect the color to turn back to orange. What gives?

When I do this in float, it works. However 8-bit and 16-bit color gives the dark yellow.

Could this be a result of division rounding errors due to quantized pixels vs floating point?

or

Was this a bug that remains on the last PC version of shake and this behaviour doesn't happen on the newer Apple versions?

--------------begin of shaketest.shk script ---------------------------------------

// Shake v2.51.1116 - © Apple Computer, Inc. 1998-2002. All Rights Reserved.
// Apple, the Apple logo, Shake, and Tremor are trademarks of Apple Computer, Inc., registered in the U.S. and other countries.
// Primatte 20 © Photron Ltd. 2002
// FLEXlm 8.1b © Globetrotter Software 2002. Globetrotter and FLEXlm are registered trademarks of Macrovision Corporation.

SetTimeRange("1");
SetFieldRendering(0);
SetFps(24);
SetMotionBlur(1, 1, 0);
SetQuality(1);
SetUseProxy("Base");
SetProxyFilter("default");
SetPixelScale(1, 1);
SetUseProxyOnMissing(1);
SetDefaultWidth(720);
SetDefaultHeight(486);
SetDefaultBytes(1);
SetDefaultAspect(1);
SetDefaultViewerAspect(1);
SetTimecodeMode("24 FPS");
SetDisplayThumbnails(1);
SetThumbSize(15);
SetThumbSizeRelative(0);
SetThumbAlphaBlend(1);

DefineProxyPath("No_Precomputed_Proxy", 1, 1, -1, "Auto", -1, 0, 0, "",1);
DefineProxyPath("No_Precomputed_Proxy", 0.5, 1, 1, "Auto", 0, 0, 1, "");
DefineProxyPath("No_Precomputed_Proxy", 0.25, 1, 1, "Auto", 0, 0, 2, "");
DefineProxyPath("No_Precomputed_Proxy", 0.1, 1, 1, "Auto", 0, 0, 3, "");

// Input nodes

ColorAlpha = Color(720, 486, 1, 0.5409, red, red, 1, 0);
ColorRGB = Color(720, 486, 2, 0.9968, 0.717, 0.451, 1, 0);

// Processing nodes

ReorderUseGreenChannel = Reorder(ColorAlpha, "gggg");
SwitchMatte1 = SwitchMatte(ColorRGB, ReorderUseGreenChannel,
1, "A", 0, 0);
MDiv1 = MDiv(SwitchMatte1, 0);
MMult1 = MMult(MDiv1, 0);

// User Interface settings

SetKey(
"colorPicker.hex", "0",
"colorPicker.range", "32",
"globals.displayThumbnails", "1",
"globals.fileBrowser.favorites", "C:/Documents and Settings/olun/;$HOME;C:/Documents and Settings/olun/Personal//nreal/;C:/Program Files/Apple/Shake/;C:/Program Files/Apple/Shake/doc/pix;",
"globals.fileBrowserExactList", "0",
"globals.fileBrowserFilterList", "1",
"globals.fileBrowserFullList", "0",
"globals.fileBrowserHeight", "540",
"globals.fileBrowserImageList", "0",
"globals.fileBrowserLC1", "230",
"globals.fileBrowserLC2", "70",
"globals.fileBrowserLC3", "110",
"globals.fileBrowserLC4", "245",
"globals.fileBrowserLC5", "175",
"globals.fileBrowserLC6", "65",
"globals.fileBrowserLC7", "111",
"globals.fileBrowserSC1", "211",
"globals.fileBrowserSC2", "211",
"globals.fileBrowserSC3", "211",
"globals.fileBrowserSeqList", "0",
"globals.fileBrowserShortList", "0",
"globals.fileBrowserWidth", "790",
"globals.fileBrowserfullPath", "0",
"globals.fontBlue", "1",
"globals.fontGreen", "1",
"globals.fontRed", "1",
"globals.noodleBlue", "1",
"globals.noodleGreen", "1",
"globals.noodleRed", "1",
"globals.noodleTension", "0.25",
"globals.paintFrameMode", "1",
"globals.project", "",
"globals.proxyTog.cycle", "-1,0,0,0,0,-1",
"globals.renderModeTog.cycle", "2,0,0,2",
"globals.rotoBuildColorBlue", "0.75",
"globals.rotoBuildColorGreen", "0.75",
"globals.rotoBuildColorRed", "0.375",
"globals.rotoFocusColorBlue", "0.9375",
"globals.rotoFocusColorGreen", "0.375",
"globals.rotoFocusColorRed", "0.5",
"globals.rotoFocusSelectColorBlue", "0.5",
"globals.rotoFocusSelectColorGreen", "1",
"globals.rotoFocusSelectColorRed", "0.5",
"globals.rotoKeyedColorBlue", "1",
"globals.rotoKeyedColorGreen", "0.65",
"globals.rotoKeyedColorRed", "0.45",
"globals.rotoNormalColorBlue", "0.125",
"globals.rotoNormalColorGreen", "0.75",
"globals.rotoNormalColorRed", "0.75",
"globals.rotoNormalSelectColorBlue", "0.0625",
"globals.rotoNormalSelectColorGreen", "1",
"globals.rotoNormalSelectColorRed", "0.0625",
"globals.rotoTangentColorBlue", "0.125",
"globals.rotoTangentColorGreen", "0.5625",
"globals.rotoTangentColorRed", "0.5625",
"globals.thumbAlphaBlend", "1",
"globals.thumbSize", "15",
"globals.thumbSizeRelative", "0",
"globals.viewerAspectRatio", "1",
"globals.viewerZoom", "1.0/proxyScale",
"globals.virtualSliderMode", "0",
"globals.virtualSliderSpeed", "0.25",
"mainQuad.bot", "0.6",
"mainQuad.left", "0.29",
"mainQuad.right", "0.35",
"mainQuad.top", "0.6",
"mainWin.height", "924",
"mainWin.tabChild1", "0.Image",
"mainWin.tabChild10", "0.Node_View_2",
"mainWin.tabChild11", "0.Time_View",
"mainWin.tabChild12", "1.Parameters1",
"mainWin.tabChild13", "1.Parameters2",
"mainWin.tabChild14", "1.Globals",
"mainWin.tabChild15", "2.Viewers",
"mainWin.tabChild16", "3.Node_View",
"mainWin.tabChild17", "3.Curve_Editor",
"mainWin.tabChild18", "3.Color_Picker",
"mainWin.tabChild19", "3.Pixel_Analyzer",
"mainWin.tabChild2", "0.Color",
"mainWin.tabChild3", "0.Filter",
"mainWin.tabChild4", "0.Key",
"mainWin.tabChild5", "0.Layer",
"mainWin.tabChild6", "0.Transform",
"mainWin.tabChild7", "0.Warp",
"mainWin.tabChild8", "0.Other",
"mainWin.tabChild9", "0.Curve_Editor_2",
"mainWin.width", "1260",
"mainWin.xPos", "10",
"mainWin.yPos", "40",
"nodeView.ColorAlpha.t", "1",
"nodeView.ColorAlpha.tnChannel", "0",
"nodeView.ColorAlpha.tnTime", "1",
"nodeView.ColorAlpha.tnVisible", "1",
"nodeView.ColorAlpha.x", "340",
"nodeView.ColorAlpha.y", "333",
"nodeView.ColorRGB.t", "1",
"nodeView.ColorRGB.tnChannel", "0",
"nodeView.ColorRGB.tnTime", "1",
"nodeView.ColorRGB.tnVisible", "1",
"nodeView.ColorRGB.x", "98.75",
"nodeView.ColorRGB.y", "329.25",
"nodeView.MDiv1.t", "0",
"nodeView.MDiv1.x", "246.5",
"nodeView.MDiv1.y", "71.25",
"nodeView.MMult1.t", "0",
"nodeView.MMult1.x", "244.5",
"nodeView.MMult1.y", "2.25",
"nodeView.ReorderUseGreenChannel.t", "0",
"nodeView.ReorderUseGreenChannel.x", "305.5",
"nodeView.ReorderUseGreenChannel.y", "262",
"nodeView.SwitchMatte1.t", "0",
"nodeView.SwitchMatte1.x", "224.5",
"nodeView.SwitchMatte1.y", "140.5",
"nodeView.xPan", "-53.75",
"nodeView.yPan", "118.75",
"nodeView.zoom", "0.8",
"pixelAnalyzer1.aStatToggleState", "0",
"pixelAnalyzer1.accumulate", "0",
"pixelAnalyzer1.bStatToggleState", "0",
"pixelAnalyzer1.bit16ToggleState", "0",
"pixelAnalyzer1.bit32ToggleState", "0",
"pixelAnalyzer1.bit8ToggleState", "1",
"pixelAnalyzer1.gStatToggleState", "0",
"pixelAnalyzer1.hStatToggleState", "0",
"pixelAnalyzer1.hex", "0",
"pixelAnalyzer1.imgToggleState", "0",
"pixelAnalyzer1.lStatToggleState", "1",
"pixelAnalyzer1.offToggleState", "0",
"pixelAnalyzer1.pxlToggleState", "1",
"pixelAnalyzer1.rStatToggleState", "0",
"pixelAnalyzer1.sStatToggleState", "0",
"pixelAnalyzer1.vStatToggleState", "0",
"timeBar.current", "1",
"timeBar.high", "100",
"timeBar.incr", "1",
"timeBar.low", "1",
"timeView.ctrls.selGroup", "0",
"timeView.wSpace.constDisp", "0",
"timeView.wSpace.dispInOut", "1",
"timeView.wSpace.endTime", "100",
"timeView.wSpace.startTime", "1",
"timeView.wSpace.trim", "0",
"updater.mode", "2",
"vDesk.0.chanTog.0.cycle", "4,0,0,0,0,0",
"vDesk.0.chanTog.1.cycle", "4,0,0,0,0,0",
"vDesk.0.compareTog.cycle", "-1,0,0,0,-1",
"vDesk.0.displayModeA", "0",
"vDesk.0.displayModeB", "0",
"vDesk.0.dodNodeSerial", "SetDOD(Select1, 0, 720, 0, 486);",
"vDesk.0.dodToggle", "0",
"vDesk.0.g", "1",
"vDesk.0.h", "594",
"vDesk.0.i", "0",
"vDesk.0.ih", "0",
"vDesk.0.isActive", "1",
"vDesk.0.iw", "0",
"vDesk.0.lookupNodeSerial0", "ViewerLookup1_(ViewerDodSelect, 1, 0, 2, 0, 0, 0, 95, rBlack, rBlack, 685, rWhite, rWhite, 0.6, rNGamma, rNGamma, 1.7, rDGamma, rDGamma, 0, rSoftClip, rSoftClip);",
"vDesk.0.lookupToggle", "0",
"vDesk.0.monitoredNodeA", "NRiScript1.MMult1",
"vDesk.0.numViewerLookups", "1",
"vDesk.0.numViewerScripts", "5",
"vDesk.0.oscAutoKeyOnOff", "0",
"vDesk.0.oscLockTog.cycle", "1,0,0,0",
"vDesk.0.oscOnOff", "1",
"vDesk.0.oscTog.cycle", "1,0,0,2",
"vDesk.0.roiOnOff", "1",
"vDesk.0.scriptNodeSerial0", "ApertureMarking(riNode, \"Auto\", 0, 0, 1, 1, 1.0, 1.0, 1.0, 1.0, 3, 1, 0.2, academyDefaultRed, academyDefaultGreen, academyDefaultBlue, academyDefaultAlpha, academyDefaultLineWidth, 1, 0.4, academyDefaultRed, academyDefaultGreen, academyDefaultBlue, academyDefaultAlpha, academyDefaultLineWidth, 1, 0.6, academyDefaultRed, academyDefaultGreen, academyDefaultBlue, academyDefaultAlpha, academyDefaultLineWidth, 0, 0.8, academyDefaultRed, academyDefaultGreen, academyDefaultBlue, academyDefaultAlpha, academyDefaultLineWidth, 0, 0.5, academyDefaultRed, academyDefaultGreen, academyDefaultBlue, academyDefaultAlpha, academyDefaultLineWidth, 0, 0.25, academyDefaultRed, academyDefaultGreen, academyDefaultBlue, academyDefaultAlpha, academyDefaultLineWidth, 1.0, 1.0, 1.0, 1.0, 3, 0, 0.2, fullDefaultRed, fullDefaultGreen, fullDefaultBlue, fullDefaultAlpha, fullDefaultLineWidth, 1, 0.4, fullDefaultRed, fullDefaultGreen, fullDefaultBlue, fullDefaultAlpha, fullDefaultLineWidth, 1, 0.6, fullDefaultRed, fullDefaultGreen, fullDefaultBlue, fullDefaultAlpha, fullDefaultLineWidth, 1.0, 1.0, 1.0, 1.0, 1, 1, 20, 0.25, tvDefaultRed, tvDefaultGreen, tvDefaultBlue, tvDefaultAlpha, tvDefaultLineWidth, 1, 10, 0.5, tvDefaultRed, tvDefaultGreen, tvDefaultBlue, tvDefaultAlpha, tvDefaultLineWidth);",
"vDesk.0.scriptNodeSerial1", "ViewerScript_2_(riNode, 1, 1, 1, Input.width/2, Input.height/2);",
"vDesk.0.scriptNodeSerial2", "ViewerScript_3_(riNode, 3, 0, .5);",
"vDesk.0.scriptNodeSerial3", "ViewZ(riNode, 0, 0, 0, 5000000, 1, 100);",
"vDesk.0.scriptNodeSerial4", "FloatView_(riNode, 2, 0, 0, 1, 1-red1, 1-green1, 1-blue1);",
"vDesk.0.scriptToggle", "0",
"vDesk.0.updateModeA", "1",
"vDesk.0.updateModeB", "1",
"vDesk.0.updateTog.0.cycle", "-1,0,0,1",
"vDesk.0.updateTog.1.cycle", "-1,0,0,1",
"vDesk.0.w", "750",
"vDesk.0.x", "0",
"vDesk.0.xPan", "12",
"vDesk.0.y", "0",
"vDesk.0.yPan", "27",
"vDesk.0.zoom", "1",
"vDesk.viewers", "1"
);

--------------end of shaketest.shk script ---------------------------------------

No, it's not a bug... What's happening is that some values (in this case, red and green) are getting clipped to 1 after the mDiv, so they're not returning the original value after the mMult, since these nodes don't concatenate.
If you're on float, though, you will obviously be able to return to the original values, since no value is clipped. You can see what's going on if you look at the values on Pixel Analyzer.

However, that would never happen if Mdiv is handled correctly... In your example, you're using it on a non premultiplied image (your switchmatte has preMultiply turned off). If you turn it on, you'll see that you'll get the same result even using 8 or 16 bits depth. That's because, on a premultiplied image, no color value can be higher than its alpha value, so Mdiv will never give you results above 1, and therefore no clipping will occur.