Can anyone fill the last bank of this C++ code? - visual-c++

dynamic memory allocation problem
I tried * but it gives only 4 zeros

Related

Increase precision in Excel

I'm attempting to display exactly the first 100 powers of 2 (e.g. 1,2,4,8,16...) in a column in Excel. Unfortunately, once I get up to about 2 raised to the 50th, I'm hit by the Excel limitation of only working with 15 digits - hence, when Excel multiplies 2^49 * 2 I get the wrong answer:
562949953421312.00 * 2 != 1125899906842620.00
I have tried the Excel option "Set Precision as Displayed", but this doesn't seem to help. I suppose it makes sense that there needs to be an upper numeric limit somewhere, but it seems that there should be a way of multiplying large numeric strings, no?
562949953421312 * 2 == 1125899906842624
Excel cannot accurately represent numbers that do not fit into 64 bits. To represent numbers beyond 2^64 (you want to reach 2^100) would require more bits, therefore Excel will lose precision with such numbers.
This is an internal limitation of excel, and you should use a different tool to get exact results. Read the corresponding knowledge base article for more details - there is even a wikipedia page to describe the issues.
Try to wrap the number in the IFERROR function
=IFERROR("1201305162827683","1201305162827683")

Excel - Working out an overall Percentage

I'm trying to create a table in Excel which works out the overall average performance of a driver.
The layout of the table is below. You can see if the driver has had drops and has no early, late and OTIF then the total should show 100%.
But if the driver was to get an Early (for example) then this will affect the total percentage (it should go down from 100% to 90% for example). But i'm unsure on what formula to use in Excel? Any help / or tips would be very helpful!
Thank you.
So I am taking a guess here that the formula you want is:
=IFERROR((E4-(B4+C4+D4))/E4,"")
Clarity is needed on whether the Early, Late or OTIF numbers decrease the percentage by a fixed 10% each, or if it is just a percentage of the successful drops.
To find that number, the easiest way to do this is the following. (Note: I am assuming that the Drops column is indicating the total number of drops and not just the number of successful drops)
The best way to do this would be to take the total number of drops and subtract the number of undesirable outcomes from it. This creates the number of successful drops. Once that number is created, a simple division by the total number of drops will create the proper percentage. see below formula
=((E5-E2-E3-E4)/E4)
This should take the total number of successful drops and divide it by the total number of drops.
Hopefully, this helped! Good luck!

Cognos 10 report not showing all values durign calculation

I am having issues with a report i am making...
The goal of the report is to show by person the percentage they are assigned to a project, and then overall capacity.
(% allocated = allocated hours / month hours)
I started with hours per a project and overall percentage and had no
issue:
But when I change the “Allocated Hours” data item to Allocated Hours/Capacity the report only shows one of the project allocations but the overall is still correct!
As a test I then tried the data item to be Allocated Hours/160 and the report showed all the items.
Does anyone have any idea of where i am going wrong?
thanks!!

Improve Excel peformance for calculation

I'm using Excel 2010 for calculation of subset. I'm using a formula with COUNTIF and checking if any of 21,000 numbers from column B are among 300,000 numbers in column A. My system is running Win 7 with two processors 4 GB RAM but simply hangs doing the calculations. I can't do anything else while it calculates because it takes ~ 100% of CPU.
Is this calculation so CPU consuming or I could do something to avoid it?
One fast way: Sort the 300000 numbers in column A and use the Double Vlookup trick to see if there are any exact matches: see this post on my blog for details of how to do it:
https://fastexcel.wordpress.com/2012/03/29/vlookup-tricks-why-2-vlookups-are-better-than-1-vlookup/

Percentages in Instruments right in the blue line in Xcode 4

When I click on a row in the use of an object, in leaks or zombie for example, the lines are marked in blue...
and there are these percentages right in the line where reason of the leak/etc. should be.
But what does the percentage number mean?
I have sometimes trouble with understanding the percentages when there are like 5 of them with 15% and 25% and so on.
It means the percentage of allocations that happened in your -init... method and where those allocations occurred. That's the instrument you're looking at and the method you drilled down into.

Resources